cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
922
Views
1
Helpful
4
Replies

Webex API to reset admin user on device register CUCM/webex edge

aalejo
Level 5
Level 5

Dear Community

It is possible to reset a device admin  account that is register over CUCM/Webex edge using webex API?

Since registration to webex does not depends on this admin account i would assume this is possible...

Thanks!

 

 

 

1 Accepted Solution

Since the xAPI request is authenticated via Bearer token in the header, when used via cloud xAPI, the user password can be an empty string for xAPI commands, e.g.:

 

headers = { "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": f"Bearer {os.getenv('WEBEX_ACCESS_TOKEN')}"
}
...
data = {
    "deviceId": deviceId,
    "arguments": {
        "NewPassphrase": os.getenv('LOCALADMINPASSWORD'),
        "Username": "admin",
        "YourPassPhrase": ""
    }
}
resp = requests.post('https://webexapis.com/v1/xapi/command/UserManagement.User.Passphrase.Set', headers=headers, json=data)

 

View solution in original post

4 Replies 4

dstaudt
Cisco Employee
Cisco Employee

Perhaps this? UserManagement User Passphrase Set

You should be able to perform this command via the Webex cloud REST API, via the remote xAPI feature: https://developer.webex.com/docs/api/v1/xapi

Hey Sr

Thanks for you answer.

This commands requires you to know current password: The idea is to reset existing password WITHOUT knowing the existing one.

Since WebEx hub can do a lot of management work over device WITHOUT using this admin account i assume this could be possible....

Thanks

Alex

Since the xAPI request is authenticated via Bearer token in the header, when used via cloud xAPI, the user password can be an empty string for xAPI commands, e.g.:

 

headers = { "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": f"Bearer {os.getenv('WEBEX_ACCESS_TOKEN')}"
}
...
data = {
    "deviceId": deviceId,
    "arguments": {
        "NewPassphrase": os.getenv('LOCALADMINPASSWORD'),
        "Username": "admin",
        "YourPassPhrase": ""
    }
}
resp = requests.post('https://webexapis.com/v1/xapi/command/UserManagement.User.Passphrase.Set', headers=headers, json=data)

 

That's was it! Thank you! thumbs up! And great explanation indeed.