UiPath CLI not working on UiPath on-premise Orchestrator

Good morning,

I am currently developing a CI/CD pipeline for UiPath automation processes and I am trying to use the UiPath CLI with our on-premise Orchestrator environment. However, I am experiencing several issues with authentication when attempting to log in using the client_id and client_secret of an External Application.

On the other hand, I was able to successfully obtain an authentication token through the Orchestrator API and configure the CLI authentication using environment variables. After doing so, running:

uip login status

returns the following result:

{
“Result”: “Success”,
“Code”: “LoginStatus”,
“Data”: {
“Status”: “Logged in”,
“Provider”: “Environment”,
“BaseUrl”: “url”,
“Organization”: “ENTORNO PREPRODUCTIVO”,
“OrganizationId”: “1”,
“Tenant”: “Default”,
“TenantId”: “1”,
“ExpirationDate”: “2026-07-27T14:05:40.000Z”
}
}

This suggests that the CLI recognizes the authentication context correctly and considers the session valid.

However, when I execute any Orchestrator command, I receive an error. For example:

uip or folders list

{

“Result”: “Failure”,

“Message”: “Error listing folders”,

“Instructions”: “Unexpected token ‘<’, \”\r\n<!DOCTYPE \“… is not valid JSON”,

“ErrorCode”: “unknown_error”,

“Retry”: “RetryWillNotFix”

}

I also tested obtaining an access token manually through the Identity Server (/identity/connect/token) and was able to successfully launch jobs directly through the Orchestrator REST API using the same token. This confirms that:

  • The External Application is correctly configured.
  • The Client ID and Client Secret are valid.
  • The access token is generated successfully.
  • The token has the required scopes.
  • Orchestrator API calls work correctly when performed directly through REST.

Because of this, it appears that the issue is specific to the UiPath CLI (or the orchestrator-tool plugin), which seems unable to properly query Orchestrator even when authentication is reported as successful.

Have you encountered this behavior before, or is there any known limitation or configuration required when using the UiPath CLI against an on-premise Orchestrator authenticated through an External Application?

Thank you for your help.

Hi @jgutierrezno

Are you able to get a result from this command:

uip login tenant list

If so make sure that you are on the right tenant, alternatively switch tenant with:

uip login tenant set MyTenant

If this does not work, perhaps try and create a new user dedicated for CLI and reconfigure/re-login.

Regards
Soren

Good morning @SorenB

I’m copying below the error I get when I try to run the command you mentioned. It is similar to the one I get when running the folders command.

{
“Result”: “Failure”,
“Message”: “Unexpected token ‘<’, "\r\n<!DOCTYPE "… is not valid JSON”,
“Instructions”: “Failed to fetch tenants. Check your network connection and try again.”,
“ErrorCode”: “unknown_error”,
“Retry”: “RetryWillNotFix”
}

Thank you very much

Hi again

Have you tried:

  • From a different machine
  • From a different network (if possible)
  • From a different terminal (eg. PowerShell, CMD etc.)
  • Login as a newly created user

Regards
Soren