cancel
Showing results for 
Search instead for 
Did you mean: 

Facing error while getting the access token using Oauth saml2

sharathnasa
Explorer
0 Kudos

Hi All,

I'm trying to get the access token from the C4C tenant using oauth saml2 assertion method. I have configured the Identity provider and also done OAuth2.0 Client Registration in the C4C. But when i try to run the code, i'm getting the below mentioned error.

{ "error":"invalid_grant","error_description":"The provided authorization grant is invalid. Exception was: Entity HTTPS://my338727-sso.crm.ondemand.com is not defined in the element 'AudienceRestriction'. For more information consult the kernel traces or the OAuth 2.0 trouble shooting SAP note 1688545." }

Could you please help me to solve this issue.

Regards,

Sharath

0 Kudos

I have also same issue and im not using SAP cloud platform

View Entire Topic
subramanyagt
Explorer
0 Kudos

I am getting the same error and have the same scenario as yours. Do we know the solution for this. In my case, Identifier (Entity ID) in Azure is matching with the local provider name.

{ "error": "invalid_grant", "error_description": "Provided authorization grant is invalid. Exception was Entity https://xyzomain.com:8001/sap/bc/sec/o is not defined in the element 'AudienceRestriction'. For more information, consult the kernel traces or the OAuth 2.0 trouble shooting SAP note 1688545"

}

wilson_degressi
Explorer
0 Kudos
hello Subraman, please were you able to fix this? If yes, please can you share the solution? Thank you, Wilson