Unable To Fetch Access Token For Orchestrator API Using External Application

How to fetch an access token for Orchestrator API using an external application?

Issue Description:

After registering a confidential external application, when sending an authentication request, a 200 Response is obtained with no access token.

Endpoint - https://{Orchestrtaor URL}/identity/connect/token

Request Body:

{

grant_type: "client_credentials"

client_id: "{app_id}"

client_secret: "{app_secret}"

scope: "{scopes}"

}

The response received is 200 but it contains an HTML doc. There is no token anywhere.

Resolution:

For confidential applications to access application scope, the external application requests an access token by sending a POST request that includes the client_id and client_secret to the Identity Server token endpoint: https://{Orchestrator_URL}/identity/connect/token.

If Postman or a similar tool is considered, use the content type application/x-www-form-urlencoded.

Check the below:

  • Identity Server token endpoint: https://{Orchestrator_URL}/identity/connect/token

rtaImage.jpg

  • Registered External Application

rtaImage (1).jpg

  • Cloud Orchestrator

Use the below parameters for Cloud Orchestrator

  1. Identity Server token endpoint: https://cloud.uipath.com/identity_/connect/token.
  2. If Postman or a similar tool is being considered, use the content type application/x-www-form-urlencoded in the Body, and in the Headers add Content-Type:application/x-www-form-urlencoded.
Example:
  • For Headers
image.png
  • For Body

image.png

Check the access token details, access https://jwt.ms/ and paste the access_token.

Example:

image.png