Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Error on redirecting to Pega during authentication




OAuth 2.0 authentication is used to authenticate with an external application with Grant Type as Authorization Code. The Callback (Redirect) URL that Pega generates is configured on the external application. However, error displays on the browser on redirecting to Pega during the authentication.

Error Messages


Caused by: pub.PRRuntimeException: Unable to obtain access token for client details in authentication profile
configured. Please check the logs for more details. 
at integration.engine.internal.client.oauth2.OAuth2ClientImpl.getAccessToken( 
at generated.activity.ra_action_pzgetaccesstoken

Caused by: pub.PRRuntimeException: Access token endpoint invocation failed : Response status : 400  Bad Request 
at integration.engine.internal.client.oauth2.OAuth2ClientImpl.getTokenFromEndpoint( 
at integration.engine.internal.client.oauth2.OAuth2ClientImpl.getAccessTokenFromEndpoint( 
at integration.engine.internal.client.oauth2.OAuth2ClientImpl.getAccessToken( 

Steps to Reproduce

  1. Configure the OAuth2.0 authentication profile rule on the external system with the Grant Type as Authorization Code
  2. Provide secret, scope and redirect endpoint to the identifier

Root Cause

The external system required scope. However, Pega did not send it when Grant Type was Authorization Code


Apply HFix-52139.


Published April 3, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us