I followed the UiPath documentation from these two links:
I created an external application in my community orchestrator with Application scope and type is Confidential. Now I’m trying to generate access token using client credentials method.
I’m using Http request activity in UiPath. I gave
Endpoint - “https://cloud.uipath.com/identity_/connect/token”
Method: Post
body -
{
“grant_type”: “client_credentials”,
“client_id”: “{my app_id}”,
“client_secret”: “{my app_secret}”,
“scope”: “OR.Folders.Read OR.Jobs.Read OR.Queues.Read”
}
Headers:
BodyFormat(property in http request activity) - application/json
Just to be sure: can you double check that when you added scopes you chose “Application Scope” and not “User Scope”?
Also, BodyFormat(property in http request activity) - application/x-www-form-urlencoded please (no need to set any header)
I am using the UiPath.Web.Activities package 1.7.0
The HTTP Request is configured for POST, with the endpoint set to “https://cloud.uipath.com/identity_/connect/token”, no attachment, no header, no body set. Body format set to application/x-www-form-urlencoded, and parameters configured as show at the bottom of the screenshot.
As mentioned before, the external application was configured as confidential, and with Application Scopes only.