cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2888
Views
5
Helpful
8
Replies

Importing Users from CUCM rather than ldap?

stephan.steiner
Spotlight
Spotlight

Hi

I don't have ldap synch (and it's not desired either) and am trying to programmatically Import users from CUCM, just like you would using the Import functionality in the CUCN Administration Interface.

If I call GET /vmrest/import/users/cucmbe?limit=5 I get a Response telling me there's one user, but no user data:

{\"@total\":\"1\"}"{\"@total\":\"1\"}"

I then tried to be smart and simply sent

POST https://chdevcucn91.nxodev.intra/vmrest/import/users/cucmbe?templateAlias=voicemailusertemplate HTTP/1.1

Accept: application/json

Content-Type: application/json; charset=utf-8

Host: chdevcucn91.nxodev.intra

Cookie: JSESSIONID=0EE4C91BAB7D314759064BE56513DA4E; JSESSIONIDSSO=1D1771287CC43150AA31E68CF93047AF

Content-Length: 135

Expect: 100-continue

{"alias":"testuser","firstName":"firstname","lastName":"test 9","dtmfAccessId":"415099","pkid":"0500397d-8e79-a3ab-2f8f-2e02430878e9"}

Assuming that the pkid is the pkid of the enduser in the CUCM database (it seems to be if I'm looking at CUCM imported users have the ccmid in the tbl_user equal to the enduser pkid), however, that only returns

HTTP/1.1 404 Not Found

X-Frame-Options: SAMEORIGIN

Content-Type: application/json

Date: Mon, 23 Jun 2014 16:17:03 GMT

Server:

Content-Length: 135

{"errors":{"code":"NOT_FOUND","message":"no importable user found with the specified object ID: 0500397d-8e79-a3ab-2f8f-2e02430878e9"}}

Now I'm wondering.. given that there's no documentation on this.. am I trying to do something that API simply cannot do or am I doing something wrong?

8 Replies 8

Geevarghese Cheria
Cisco Employee
Cisco Employee

Hi Stephan,

Found a bug related to this issue - CSCui79909 Also request you to refer this url -

https://communities.cisco.com/docs/DOC-48406

for related information

Thanks and Regards,
Geevarghese

Hmm... the solution is only mentioned for 9.1(1) - do you have any idea if a fix for 9.1(2) is in the works? Just to make sure I upgraded my lab Server to the latest 9.1(2) release but the machine still behaves the same way as before.

@All
Has anyone found a solution for this topic? Together with my teammates, we are working on the application that does UC user auto-provisioning. The CUCM side is done and now we need to create the account on CUC, For that, we would like to use this API. We are building this on version 12.5 but we see the same problem as @stephan.steiner. Looks like this is something that has never been fixed.

Furthermore, if you perform this operation via UI - all is working as expected and we are able to import users from CUCM.

 

As a workaround we see only one option - create a local not synced account on CUC but this is the worst-case scenario.

 

PS. The API against LDAP works perfectly.

Marek
Web: https://gaman-gt.com

Hi Marek,

 

I'll check with the BU to confirm if this defect had been fixed.  For many of CUC UI functionalities, the underlining calls are HTTP REST APIs so you may want to turn on developer mode on your browser (Chrome) to see if you can see the raw HTTP contents of the UI that works when you try to import a user from CUCM.

 

Regards,

 

David

I'm afraid the import functionality doesn't use CUPI. Importing a user from the phone system goes here: POST https://srvcucn12.nxodev.intra/cuadmin/ccm-import.do?op=save

Michael Stark
Level 7
Level 7

Can anyone confirm if they have solved this one for importing a CUCMBE user through API?

stephan.steiner
Spotlight
Spotlight

I'd say not fixed. Just ran it on my CUCN 12.5 in my lab...

GET https://srvcucn12.nxodev.intra/vmrest/import/users/cucmbe?limit=10

returns this

<ImportUsers total="369"/>

It gives the number of items, but not the content that you'd need to continue. So even though this case that I opened ages ago says it's fixed, in fact it ain't, or they just fixed it for that particular version. I guess that's the reason why my software either does ldap import or creates mailboxes completely manually. There's also another case about the API to import from CUCM to be missing. Is this by any chance your case @Michael Stark 

It looks like the 'fix' for CSCui79909 was to attempt to remove all mention/examples of the 'cucmbe' import type from the docs, assumedly because a fix/implementation wasn't in the cards.  Probably best to assume that only the 'ldap' type is working, for querying importable users (GET) or executing imports (POST).

As Stephan suggests, the workaround would be to use the CUCM AXL API to identify importable users, and then use the CUCM CUPI API to create the accounts 'manually'...

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: