Error authenticating to 2016 Orchestrator server to use API when not using default admin

Hi

I am developing some Powershell management scripts that use the Invoke-RestMethod to authenticate to the orchestrator server (2016) and collect some information about the robots.

If I use the default admin account to authenticate using the “/api/account/authenticate” URL it works fine a token is generated that I can use for further requests. However if I use another account that has the administration role I receive an error in response to the request.

  • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
  • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

If I try the same command against our 2018 Orchestrator server I can use any account that has the rights to either view or edit the requested objects.

Is there an additional step that I have to perform on the 2016 Orchestrator to use an account other than the default admin account?

Cheers

David

Hi David,

Can you share the content of the server response and the status code (not sure if that is coming along with the Exception)
Also, could you test accessing the same API using a different tool to get more visibility (curl or postman)

Best regards,

Quentin