Calling Cloud API returns Invalid Client using Client credentials
Issue Description
Calling Cloud API returns Invalid Client using Client Credentials
{
"error": "invalid_client"
}
Resolution
This error occurs in three scenarios:
- The client ID is incorrect
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.
- The client secret is incorrect
Regenerate the secret. See Generating A New App Secret documentation. After regenerating the secret, try the API call using the new secret.
- The App Registration does not have application-scoped permissions or is not a confidential app.
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 do 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 steps 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.
-
-