Skip to content

Instantly share code, notes, and snippets.

@rossbelmont
Last active November 3, 2022 12:18
Show Gist options
  • Save rossbelmont/324701bf403ea198b5030fba252e7d3f to your computer and use it in GitHub Desktop.
Save rossbelmont/324701bf403ea198b5030fba252e7d3f to your computer and use it in GitHub Desktop.
MD API PermSet Issue

Potential bug in the Metadata API

Here's a note from one of our customer-facing architects:

I'm trying to load external credentials as metadata. Apparently, I can not push metadata that has a perm set and header all at once. I have to delete the perm set from the metadata for it to work. If I then resubmit the original metadata, it’s successful.

I have to do it twice, which is a bummer — deployment fails and I have to manually intervene.

<?xml version="1.0" encoding="UTF-8"?>
<ExternalCredential xmlns="http://soap.sforce.com/2006/04/metadata">
<authenticationProtocol>Custom</authenticationProtocol>
<externalCredentialParameters>
<parameterName>X-API-Key</parameterName>
<parameterType>AuthHeader</parameterType>
<parameterValue>ujEAPwiJW47mXEtaixnn41D3TzlvjGLP4VvCYWjc</parameterValue>
<sequenceNumber>1</sequenceNumber>
</externalCredentialParameters>
<externalCredentialParameters>
<parameterName>TranslateServiceDemo</parameterName>
<parameterType>NamedPrincipal</parameterType>
<principal>TranslateServiceDemo</principal>
<sequenceNumber>1</sequenceNumber>
</externalCredentialParameters>
<label>TranslationServiceExtCred</label>
</ExternalCredential>
<?xml version="1.0" encoding="UTF-8"?>
<ExternalCredential xmlns="http://soap.sforce.com/2006/04/metadata">
<authenticationProtocol>Custom</authenticationProtocol>
<externalCredentialParameters>
<parameterName>X-API-Key</parameterName>
<parameterType>AuthHeader</parameterType>
<parameterValue>ujEAPwiJW47mXEtaixnn41D3TzlvjGLP4VvCYWjc</parameterValue>
<sequenceNumber>1</sequenceNumber>
</externalCredentialParameters>
<label>TranslationServiceExtCred</label>
</ExternalCredential>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment