The callout couldn’t access the endpoint. You might not have the required permissions, or the named credential “Named_Credential_API_Name” might not exist exception in Salesforce

The callout couldn’t access the endpoint. You might not have the required permissions, or the named credential “Named_Credential_API_Name” might not exist exception in Salesforce

Exception:

The callout couldn’t access the endpoint. You might not have the required permissions, or the named credential “Named_Credential_API_Name” might not exist exception in Salesforce

Resolution:

Please check the following to resolve the issue

1. Make sure the User Profile have access to Standard Object “User External Credentials”.

2. If you are using “Identity Type” as “Per User”, make sure the users have access to the Named Credential.

3. If you are using “Identity Type” as “Named Principal”, then make sure the Named Credential API Name used in the Apex Code is correct and matches. Named credential name is case-sensitive while using it in the Apex Code.

Leave a Reply