CLI - Error retrieving bearer token

I am having a problem connecting to on-prem Orchestrator using CLI.
I am using “Client Credentials” authentication method.

I am getting following response to any CLI command

Z:\>uipath orchestrator status get
Error retrieving bearer token: Token service returned status code '405' and body '{"error":{"code":"UnsupportedApiVersion","message":"The HTTP resource that matches the request URI 'https://***/identity_/connect/token' does not support HTTP method 'POST'.","innerError":null}}'

When I add --identity-uri option I am getting the following response:

Z:\>uipath orchestrator status get --identity-uri https://***/identity
Error retrieving bearer token: Token service returned status code '400' and body '{"error":"invalid_scope"}'

Orchestrator version 2023.10.6

Any idea what I could do wrong?

Thx

P.S. I found two different CLIs
https://uipath.visualstudio.com/Public.Feeds/_artifacts/feed/UiPath-Official/NuGet/UiPath.CLI.Windows

Which one is the valid one?

would use CLI Version which is in level to the ORC

I asked the author of this tool:

The trick is in adding “/” at the end of --uri global option. In such case it omits organization and tenant which are needed for Cloud system but not for on-prem one.

Cheers

1 Like