Update Modern Folder Unattended Robot Password Through API Call

How to update Unattended Robot password through API call ?

Issue Description: Develop a Password maintenance automation that should update passwords for other Unattended Robot(s) through API calls. The Automation will authenticate with Orchestrator API (with Admin credentials) and call API to update the Robot password.

Resolution:

  1. Use the PUT method with endpoint - https://OrchestratorUrl/odata/Users(key) and below is the JSON to be provided
  2. Ensure to not delete any parameters from JSON, otherwise, it will update those in the user
  3. Get the User Id ("Id") via endpoint - https://OrchestratorUrl/odata/Users using GET method
  4. The UserName should be the same as defined at the time of the creation
  5. Extract all the below details from API - https://OrchestratorUrl/odata/Users(key) using the GET method

{
"Id": 4,
"Name": "",
"Surname": "",
"UserName": "abc",
"DirectoryIdentifier": null,
"Domain": null,
"FullName": "",
"EmailAddress": "abc@uipath.com",
"IsEmailConfirmed": false,
"IsActive": true,
"AuthenticationSource": null,
"Password": null,
"LastLoginTime": "2022-03-18T13:26:04Z",
"CreationTime": "2021-08-15T11:56:47Z",
"RolesList": [
"Robot"
],
"OrganizationUnits": [],
"TenancyName": "Default",
"TenantDisplayName": "Default",
"TenantId": 1,
"Type": "User",
"NotificationSubscription": {
"QueueItems": true,
"Robots": true,
"Jobs": true,
"Tasks": true,
"Schedules": true,
"Queues": true,
"Insights": true,
"CloudRobots": true
},
"MayHaveRobotSession": false,
"MayHaveUnattendedSession": true,
"MayHaveUserSession": true,
"MayHavePersonalWorkspace": false,
"BypassBasicAuthRestriction": false,
"UnattendedRobot": {
"UserName": "domain\\username",
"CredentialStoreId": 1,
"CredentialType": "Default",
"LimitConcurrentExecution": false,
"Password": "PasswordChanged123",
"ExecutionSettings": {
"TracingLevel": "Information",
"StudioNotifyServer": true,
"LoginToConsole": false,
"AutoDownloadProcess": true
}
},
"IsExternalLicensed": false,
"RestrictToPersonalWorkspace": false
}

  1. For a successful request, a 200 OK status will be received.


image.png

1 Like

A post was split to a new topic: While updating Unattended Robot password through API call using PUT, error 500 is thrown