Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited title
Link
identigral
  • 7.8k
  • 34
  • 33
  • 45

How do I use a Custom External Auth Provider (OAuth) w/with per-user Named Credential to Access the Provider's API?

Source Link

How do I use a Custom External Auth Provider (OAuth) w/ per-user Named Credential to Access the Provider's API?

I have a custom AuthProviderPluginClass implementation that is working fine for authorization and the related registration handler in my community for External Identity users. I've configured the NamedCredential to use the authprovider, protocol OAuth 2.0, type=Per User. After successfully logging into the community context as a user following the authentication and authorization of the external provider any attempt to access the provider's API returns this message in the logs:

EXCEPTION_THROWN|[61]|System.UnexpectedException: You don't have permission to view this data. Ask your administrator to set up authentication for the external data source.

Any ideas on how to grant permission or otherwise bypass this for the very same external data source from which the user has already authenticated and authorized?