Authorize REST API using OAuth 2.0 and SAML 2.0
Hello,
Context:
We have a JS web component which uses DX API and we have configured PEGA api service package to use OAuth 2.0 authentication type with stateless processing mode. We'd like to use SAML bearer grant type in order to retrieve the OAuth access token.
Setup:
We have configured an SAML authentication service (mapped to Auth0) and we're able to use it to authenticate a Auth0 user. The graphical part being done, we have set the OAuth grant type to SAML bearer and created the required SAML identity mapping.
Issue:
The OAuth token endpoint (oauth2/v1/token) returns an "invalid_grant" error with a null message.
How to reproduce:
Create a POST request to "oauth2/v1/token" passing client_id, client_secret, grant_type and assertion as form data. Add content-type header "application/x-www-form-urlencoded". In assertion, put the SAML assertion, from SAML response, in base64 encoding.
NB: client id, client secret and SAML assertion has been removed in screenshot
***Edited by Moderator: Pooja Gadige to add capability tags***