0

I'm trying to use Named Credential to authenticate to an external API. I'm storing the credentials(token and api-key) under 'Principals' in External Credential. But I noticed that when I'm adding multiple parameters in a principal, it's wiping out the values on saving. When I re-open/edit the Principal, the values are wiped out/blank. Has anyone else faced this issue? I need both token and api-key in my header. Do I need to create two Principals, here. Screenshot attached

1
  • This may sound bizarre, but do the values actually get passed when you use the Named Credential? I know in the Legacy Named Credentials you (rightly so) can't actually see the values of the secrets once you've entered them and try to edit the credential and I am wondering if this is the same behaviour happening here? Commented Aug 3, 2023 at 8:41

1 Answer 1

3
+25

Have been doing quite some development with External Credentials and this this seem to be the normal process. My best guess is that this is salesforce way to make the parameters secure by making them "save and forget".


If you add all the parameters at the same time and click save, the values are available to be used in the "Custom Headers" section after one checks "Allow Formulas in HTTP Header" on the related Named Credential.

Below you can see that i reference the external credential api name: Custom Header using principals parameters If i click edit on my related principal you can see that the value field is blank. Even though i know this field has a value. Principle parameters

Note: Remember to create a permission set where you grant access to the external credentials principal values. Access is given under "External Credential Principal Access".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .