Update local account password via REST from Delinea secret server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2022 09:22 AM
We need to update the password of a local ServiceNow account that is used by automation. We use this account to get an OAuth token and our Secret Server updates AD and an AAD. We would like to automate this process, but we attempted to do this via Postman and using the REST API on the sys_user table. We can see that an update is done to the user profile, but the password does not change. Any suggestions?
- Labels:
-
Password Reset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2022 11:40 AM
Hi, please share how REST request looks like, what parameters, headers, etc are being used there
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2022 10:18 AM
We used the table api on sys_user. We tried it through PowerShell. Headers were:
Content-Type: application/json
Authorization : Basic <username: password> (encoded)
The user authorizing is the one getting the password changed. Does it need the admin role to change passwords?
function updatePassword($newPassword) {
$uri = 'https://<instance>.service-now.com/api/now/table/sys_user/<user sys_id>?sysparm_input_display_value=true';
$body =convertto-json -inputobject @{ "user_password" = $newPassword};
$result = Invoke-RestMethod -Method put -uri $uri -Headers $headers
}