Calling Cloud API returns Invalid Client using Client credentials
Issue Description
Calling Cloud API returns Invalid Client using Client Credentials
{
"error": "invalid_client"
}
Diagnosing/Resolving
-
This error occurs in three scenarios:
-
The client ID is incorrect
-
The client secret is incorrect
-
The App Registration does not have application scoped permissions or is not a confidential app.
-
-
To resolve this do the following:
-
Go to the app registration in Orchestrator and verify the Client ID. Take a screenshot in case a ticket is needed. See Managing External Applications for how to get the application registrations.
-
Regenerate the secret. See Generating A New App Secret documentation. After regenerating the secret, try the API call using the new secret.
-
Verify the application has Application Scope permissions.
-
Go to the App Registration per Managing External Applications
-
Find the App Registration and select Edit.
-
The Application Scope should be confidential and have application scopes defined.
-
-
-
If the above does not help with the issue, provide the following to UiPath Support:
-
Screenshots of the application ID.
-
Screenshots of the application registration.
-
Information on how the API call is being made. For example, if using powershell, include the relevant powershell code. If using Postman, include the postman configuration (screenshots should be enough)
-
For Postman, a HAR trace can be gathered using the following steps: How To Get Logs From The Postman Desktop App?
-
A HAR trace of the issue should be enough for UiPath.
-
-
If using a custom application that runs locally on the testing machine, try getting a fiddler trace. Go through step 4-7 of this KB article : How To Use Fiddler As A Proxy For The Robot Service To Collect Information ?
-
After completing these steps, just restart the application being debugged.
-
Typically applications automatically pick up fiddler settings and it should be possible to see the network traffic from the application after this point.
-
-
-