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 which should update password for other Unattended Robot(s) through API call. 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. Also, get the UserId via endpoint - https://OrchestratorUrl/odata/Users using GET method
  4. Username should be same as defined at time of creation
  5. Get all the below details from API - https://OrchestratorUrl/odata/Users using 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":"2021-09-08T13: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":"Networkchg@123",

"ExecutionSettings":{}

},

"IsExternalLicensed":false,

"RestrictToPersonalWorkspace":false

}