#1MinuteTip Named Credentials is used in Salesforce to integrate Salesforce with external systems. It contains a built-in authentication mechanism to authenticate with external systems and makes integration a little easier.
With the evolution of technology, Salesforce has improved the features in Named Credentials also. This includes:
- Pass custom headers (name/value pairs)
- Link named credentials to permission sets to grant explicit access to users
- Temporary access and role assumption for Amazon IAM:
- Reuse credential across different API endpoints
- Support for custom setup UIs
References & Useful URLs
- Salesforce Developer’s Blog Post – Announcing the Next Generation of Named Credentials
The new named credentials are great, with one small exception they don’t work. A developer named credentials for several of our services using the new service end points. I debugged for hours trying to figure out why it kept claiming the named credential did not exist. Finally I created the same credentials making just a minor change in the name as legacy named credentials. The legacy named credentials worked just fine.
There is no indication as to what the error really is, but in seems like salesforce just re-engineered named credentials to always fail.
Hi Bill, I have used named credentials + external credentials in a few places and it works fine, though it did require tinkering around. I do have plans to come up with step-by-step guides on how to use named credential with external credentials. 🙂
I am also trying to use New named credentials to assume IAM role via STS. But always getting message “System.CalloutException: We couldn’t get credentials from Amazon Session Token Service. Contact your Salesforce administrator. {0}”.
Use case: I want to access AWS using New Named credentials by using AWS IAM role.
Please help me with the steps that would be greatly appreciated.
Hi Pavan, I haven’t tried using named credentials & external credentials with AWS. We do have plans to try it out and come up with a step-by-step guide, but it may take a while. If you are able to figure it out do send me the details. We will publish the blog post and give the credit to you.
Hey, is there a step by step guide available yet?
Hi Jarrell, I have used the name credentials in various blog posts on different topics. Please take a look at the following and see if they help.
1. How to Make HTTP Callout (GET) from Salesforce Flow to Display Contact’s Current Time
2. How to Make HTTP Callout (POST) from Salesforce Flow to OpenAI API
I keep getting the same error msg