08-31-2023 10:34 AM
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!
Solved! Go to Solution.
08-31-2023 12:41 PM
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)
08-31-2023 10:56 AM - edited 08-31-2023 10:58 AM
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
08-31-2023 11:06 AM
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
08-31-2023 12:41 PM
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)
08-31-2023 04:20 PM
That's was it! Thank you! thumbs up! And great explanation indeed.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide