To authenticate a named credential as a user in the org, ones profile has to have access to the named credential. This is done in the profile setup under the related list "Enabled Named Credential Access".

My question is: how do you migrate this setting to other orgs?

I have tried retrieving the profile metadata using the following package.xml. both with wildcard and with a named NamedCredential.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

The setting is nowhere to be found in the retrieved admin.profile

  • @identigral no it doesnt.This is specifically about how to deploy profile level access to named credentials. – Andreas86 Apr 30 at 7:15