I need to update the unattended credentials of an account of the type ‘Robot’.
Currently i have a powershell script, which sends a request to the orchestrator.
I am using the call /odata/Users({Id}) from the orchestrator swagger documentation.
Except the response I get is this:
{
“message”: “This type of user cannot be updated.”,
“errorCode”: 1407,
“traceId”: “”,
“resourceIds”: null
}
The request body is this:
{
“UnattendedRobot”: {
“UserName”: “$machineName\$userName”,
“Password”: “password”
}
}
Is there a way to do this?
There is another API call that you can use to update the credentials of an unattended robot. You can use ’/odata/Assets’ API call to update the credential asset associated with the robot.
Please try the following powershell script & let us know:
This results in the same error, I do not believe the problem is with the request body. When editing the same information through the orchestrator UI there is no problem
From the error message, it seems that for that robot type, the Rest API call endpoint and Body json is a different one.
In this case, you need to use the Inspect tool in your browser → Network → then change again the robot password in your UI. Monitor the request that was made and adapt the request in your external tool.
If you want to update the password of a different robot, make a PUT request to the same endpoint, using the ID of the respective user.
I have done this. My request already resembled the request sent from the orchestrator, which we see using the inspect Tool:
The Orchestrator UI also calls the /odata/Users({userId}) method POST, endpoint.
Except nothing we do seems to resolve the error message “This type of user cannot be updated”.
Why is updating, or Creating a User of the type ‘Robot’ Not allowed?
The issue seems to be the user Type.
When the user is of type ‘Robot’, no modification or creation is allowed.
When the user is of type ‘DirectoryUser’ it behaves as expected.