cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1111
Views
0
Helpful
4
Replies

Unity Connection CUPI - Change users Unified Messaging Service

mike.wilcox
Level 1
Level 1

Greetings,

 

Using CUPI on Unity Connection 11.5 I need to change the Unified Messaging service for users as they move from one email system to another. I am not finding an API call to do that.

 

Any help would be appreciated.

 

Thanks,

 

Mike

4 Replies 4

dstaudt
Cisco Employee
Cisco Employee

I suspect you will want to look at the CUCM AXL API for this, i.e. <updateUser>: https://pubhub.devnetcloud.com/media/axl-schema-reference/docs/Files/AXLSoap_updateUser.html#Link113A

See the <serviceProfile> field.

Hi Dave,

All of the users are using the system default service profile in CUCM. What I am trying to do is:

In Unity we have two Unified Messaging Services. One for Exchange on prem and one for Exchange online. As we move users from on prem to online, I need to tell Unity to change the users’ Unified Messaging Service from on prem to online.

Thanks,

Mike

This seems to be possible via the CUPI API: https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/connection/REST-API/CUPI_API/b_CUPI-API.html

 

I was able to list/remove/add a different Unified Messaging Service Account to a user with the below sequence...hope this helps!

 

** Search user by Alias to get the ID

GET https://ds-cuc115.cisco.com/vmrest/users?query=%28Alias%20is%20janedoe%29 HTTP/1.1
Accept-Encoding: gzip,deflate
Host: ds-cuc115.cisco.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Authorization: Basic QWRtaW5pc3RyYXRvcjpDaXNjbyFwc2R0IQ==
------------------------
<Users total="1">
   <User>
      <URI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300</URI>
      <ObjectId>2f8a1e8d-f592-43c2-9966-de745961f300</ObjectId>
      <FirstName>Jane</FirstName>
      <LastName>Doe</LastName>
      <Alias>janedoe</Alias>
      <City/>
      <Department/>
      <EmployeeId/>
      <DisplayName>janedoe</DisplayName>
      <EmailAddress/>
      <TimeZone>4</TimeZone>
      <CreationTime>2019-10-17T19:59:41Z</CreationTime>
      <CosObjectId>de75eeab-073d-4406-9324-1060331ddbf3</CosObjectId>
      <CosURI>/vmrest/coses/de75eeab-073d-4406-9324-1060331ddbf3</CosURI>
      <Language>1033</Language>
      <LocationObjectId>754e3d8c-51a0-4989-a3f2-af48f2eb6b60</LocationObjectId>
      <LocationURI>/vmrest/locations/connectionlocations/754e3d8c-51a0-4989-a3f2-af48f2eb6b60</LocationURI>
      <ListInDirectory>true</ListInDirectory>
      <IsVmEnrolled>true</IsVmEnrolled>
      <MediaSwitchObjectId>0b2f1648-7c66-4a85-8c84-a490bd61b284</MediaSwitchObjectId>
      <PhoneSystemURI>/vmrest/phonesystems/0b2f1648-7c66-4a85-8c84-a490bd61b284</PhoneSystemURI>
      <CallHandlerObjectId>ec1420db-722c-4b45-94c9-eae37bc14bb8</CallHandlerObjectId>
      <CallhandlerURI>/vmrest/handlers/callhandlers/ec1420db-722c-4b45-94c9-eae37bc14bb8</CallhandlerURI>
      <DtmfAccessId>1112</DtmfAccessId>
      <VoiceNameRequired>false</VoiceNameRequired>
      <PartitionObjectId>1e827e48-0957-47d1-b386-aefaaa0bb7bd</PartitionObjectId>
      <PartitionURI>/vmrest/partitions/1e827e48-0957-47d1-b386-aefaaa0bb7bd</PartitionURI>
      <Inactive>false</Inactive>
      <MwisURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/mwis</MwisURI>
      <NotificationDevicesURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/notificationdevices</NotificationDevicesURI>
      <MessageHandlersURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/messagehandlers</MessageHandlersURI>
      <ExternalServiceAccountsURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts</ExternalServiceAccountsURI>
      <AlternateExtensionsURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/alternateextensions</AlternateExtensionsURI>
      <PrivateListsURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/privatelists</PrivateListsURI>
      <VideoServiceAccountsURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/videoserviceaccounts</VideoServiceAccountsURI>
      <UserWebPasswordURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/credential/password</UserWebPasswordURI>
      <UserMailboxURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/mailboxattributes</UserMailboxURI>
      <MailboxStoreName>testMailboxStore</MailboxStoreName>
      <UserVoicePinURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/credential/pin</UserVoicePinURI>
      <UserRoleURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/userroles</UserRoleURI>
      <SmtpProxyAddressesURI>/vmrest/smtpproxyaddresses?query=(ObjectGlobalUserObjectId%20is%202f8a1e8d-f592-43c2-9966-de745961f300)</SmtpProxyAddressesURI>
      <AlternateNamesURI>/vmrest/alternatenames?query=(GlobalUserObjectId%20is%202f8a1e8d-f592-43c2-9966-de745961f300)</AlternateNamesURI>
   </User>
</Users>

** List the available external services configured

GET https://ds-cuc115.cisco.com/vmrest/externalservices
---------------------------------
<ExternalServices total="2">
   <ExternalService>
      <URI>/vmrest/externalservices/1933ee9a-e969-4122-aa65-a44ac541ab96</URI>
      <ObjectId>1933ee9a-e969-4122-aa65-a44ac541ab96</ObjectId>
      <AuthenticationMode>3</AuthenticationMode>
      <DisplayName>testUnifiedMessagingService1</DisplayName>
      <IsEnabled>true</IsEnabled>
      <SecurityTransportType>1</SecurityTransportType>
      <Server>exchange.example.com</Server>
      <ServiceAlias>admin</ServiceAlias>
      <ServicePassword/>
      <ServerType>4</ServerType>
      <SupportsCalendarCapability>true</SupportsCalendarCapability>
      <SupportsTtsOfEmailCapability>true</SupportsTtsOfEmailCapability>
      <ValidateServerCertificate>false</ValidateServerCertificate>
      <UseServiceCredentials>true</UseServiceCredentials>
      <SupportsMailboxSynchCapability>true</SupportsMailboxSynchCapability>
      <ExchDoAutodiscover>false</ExchDoAutodiscover>
      <ExchServerType>0</ExchServerType>
      <MailboxSynchFaxAction>1</MailboxSynchFaxAction>
      <MailboxSynchEmailAction>2</MailboxSynchEmailAction>
      <ExternalServiceResetURI>/vmrest/externalservices/1933ee9a-e969-4122-aa65-a44ac541ab96/reset</ExternalServiceResetURI>
   </ExternalService>
   <ExternalService>
      <URI>/vmrest/externalservices/0a03ceed-5bce-4a57-9b5e-3a4df2e9e31e</URI>
      <ObjectId>0a03ceed-5bce-4a57-9b5e-3a4df2e9e31e</ObjectId>
      <AuthenticationMode>3</AuthenticationMode>
      <DisplayName>testUnifiedMessagingService2</DisplayName>
      <IsEnabled>true</IsEnabled>
      <SecurityTransportType>1</SecurityTransportType>
      <Server>exchange2.example.com</Server>
      <ServiceAlias>admin</ServiceAlias>
      <ServicePassword/>
      <ServerType>4</ServerType>
      <SupportsCalendarCapability>true</SupportsCalendarCapability>
      <SupportsTtsOfEmailCapability>true</SupportsTtsOfEmailCapability>
      <ValidateServerCertificate>false</ValidateServerCertificate>
      <UseServiceCredentials>true</UseServiceCredentials>
      <SupportsMailboxSynchCapability>true</SupportsMailboxSynchCapability>
      <ExchDoAutodiscover>false</ExchDoAutodiscover>
      <ExchServerType>0</ExchServerType>
      <MailboxSynchFaxAction>1</MailboxSynchFaxAction>
      <MailboxSynchEmailAction>2</MailboxSynchEmailAction>
      <ExternalServiceResetURI>/vmrest/externalservices/0a03ceed-5bce-4a57-9b5e-3a4df2e9e31e/reset</ExternalServiceResetURI>
   </ExternalService>
</ExternalServices>

** List the user's current external service accounts

GET https://ds-cuc115.cisco.com/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts
------------------------
<ExternalServiceAccounts total="1">
   <ExternalServiceAccount>
      <URI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts/a5f3dd69-f499-4502-bcb5-76d6633ec1a2</URI>
      <ObjectId>a5f3dd69-f499-4502-bcb5-76d6633ec1a2</ObjectId>
      <ExternalServiceObjectId>0a03ceed-5bce-4a57-9b5e-3a4df2e9e31e</ExternalServiceObjectId>
      <SubscriberObjectId>2f8a1e8d-f592-43c2-9966-de745961f300</SubscriberObjectId>
      <UserURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300</UserURI>
      <EnableCalendarCapability>true</EnableCalendarCapability>
      <EnableMeetingCapability>false</EnableMeetingCapability>
      <EnableTtsOfEmailCapability>true</EnableTtsOfEmailCapability>
      <IsPrimaryMeetingService>false</IsPrimaryMeetingService>
      <LoginType>0</LoginType>
      <UserPassword/>
      <EmailAddress>janedoe@exchange2.example.com</EmailAddress>
      <EnableMailboxSynchCapability>true</EnableMailboxSynchCapability>
      <EmailAddressUseCorp>false</EmailAddressUseCorp>
      <UserExternalServiceResetURI>/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts/a5f3dd69-f499-4502-bcb5-76d6633ec1a2/reset</UserExternalServiceResetURI>
   </ExternalServiceAccount>
</ExternalServiceAccounts>

** Delete their old account (seems you can't have 2 Exchange accounts at the same time?)

DELETE https://ds-cuc115.cisco.com/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts/a5f3dd69-f499-4502-bcb5-76d6633ec1a2
----------------------
HTTP/1.1 204 No Content

** Create a new external service account for the user

POST https://ds-cuc115.cisco.com/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Content-Length: 652
Host: ds-cuc115.cisco.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Authorization: Basic QWRtaW5pc3RyYXRvcjpDaXNjbyFwc2R0IQ==

   <ExternalServiceAccount>
      <ExternalServiceObjectId>1933ee9a-e969-4122-aa65-a44ac541ab96</ExternalServiceObjectId>
      <EnableCalendarCapability>true</EnableCalendarCapability>
      <EnableMeetingCapability>false</EnableMeetingCapability>
      <EnableTtsOfEmailCapability>true</EnableTtsOfEmailCapability>
      <IsPrimaryMeetingService>false</IsPrimaryMeetingService>
      <LoginType>0</LoginType>
      <UserPassword/>
      <EmailAddress>janedoe@exchange.example.com</EmailAddress>
      <EnableMailboxSynchCapability>true</EnableMailboxSynchCapability>
      <EmailAddressUseCorp>false</EmailAddressUseCorp>
   </ExternalServiceAccount>
--------------------------
HTTP/1.1 201 Created
Location: https://ds-cuc115.cisco.com/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts/vmrest/users/2f8a1e8d-f592-43c2-9966-de745961f300/externalserviceaccounts/d149c2a4-6aae-44dd-bdf8-d1581ce498e5

Thanks Dave, I’ll give it a try. I was thinking the last step was creating a new system wide service, not adding the service to the user, so I “couldn’t find” what was right in front of me. 😊

Mike
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: