I want to use OpenId for Salesforce authentication.
I have done the following:
- created an auth provider (like in this tutorial: https://help.salesforce.com/articleView?id=sso_provider_sfdc.htm&type=0)
- created a Connected App (Callback URL: my .Net Core web app; Selected OAuth Scopes: all scopes)
- wrote a .Net Core web app and I use Microsoft.AspNetCore.Authentication.OpenIdConnect for OpenId
Now I test the OpenId authentication and it works. Finally I want to use the openId response access token for salesforce REST API, but it does not work. I get:
[
{
"message": "This session is not valid for use with the REST API",
"errorCode": "INVALID_SESSION_ID"
}
]
Could someone tell me how I can use the openId access token for Rest API?
Thanks, mg92