Newer Version Available

This content describes an older version of this product. View Latest

ExternalAuthIdentityProvider

Represents an external authentication (auth) identity provider. An external auth identity provider links to an external credential and obtains OAuth tokens for outbound callouts to external systems.

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

ExternalAuthIdentityProvider components have the suffix .externalAuthIdentityProvider and are stored in the externalAuthIdentityProviders folder.

Version

ExternalAuthIdentityProvider components are available in API version 62.0 and later.

Special Access Rules

Only users with the Customize Application permission or the Manage Named Credentials permission can access this type.

Fields

Field Name Description
authenticationFlow
Field Type
IdentityProviderAuthFlow (enumeration of type string)
Description

Required.

Authentication flow to get tokens to call protected APIs. Values are:

  • AuthorizationCode
  • SalesforceDefined
authenticationProtocol
Field Type
IdentityProviderAuthProtocol (enumeration of type string)
Description

Required.

The authentication protocol that’s required to access the external system. Values are:

  • OAuth
  • SalesforceDefined
description
Field Type
string
Description
A meaningful description of the external auth identity provider.
externalAuthIdentityProviderParameters
Field Type
ExternalAuthIdentityProviderParameter[]
Description
One or more sets of parameters that further configure the external auth identity provider.
label
Field Type
string
Description

Required.

Name of the external auth identity provider.

ExternalAuthIdentityProviderParameter

Represents the parameters that configure an external auth identity provider.

These parameters are used internally to provide a flexible architecture and are exposed here for packaging reasons.

Field Name Description
description
Field Type
string
Description
A human-readable description of this external auth identity provider parameter.
parameterName
Field Type
string
Description

Required.

The name of the external auth identity provider parameter.

parameterType
Field Type
ExtlIdentityProviderParmType (enumeration of type string)
Description

Required.

The type of external auth identity provider parameter. The value of this field drives the behavior of the parameter. Values are:

  • AuthorizeRequestQueryParameter
  • AuthorizeUrl
  • ClientAuthentication
  • CreatedByNamespace
  • IdentityProviderOptions
  • RefreshRequestBodyParameter
  • RefreshRequestHttpHeader
  • RefreshRequestQueryParameter
  • StandardExternalIdentityProvider
  • TokenRequestBodyParameter
  • TokenRequestHttpHeader
  • TokenRequestQueryParameter
  • TokenUrl
  • UserInfoUrl
parameterValue
Field Type
string
Description
If the parameterType field describes a literal value then the literal value is stored in this field.
sequenceNumber
Field Type
int
Description
Specifies the order of parameters to apply when an external auth identity provider has more than one parameter. Priority is from lower to higher numbers (for example, 1 is the highest priority).

Declarative Metadata Sample Definition

The following is an example of an ExternalAuthIdentityProvider component.

1<?xml version="1.0" encoding="UTF-8"?>
2<ExternalAuthIdentityProvider xmlns="http://soap.sforce.com/2006/04/metadata">
3    <authenticationFlow>AuthorizationCode</authenticationFlow>
4    <authenticationProtocol>OAuth</authenticationProtocol>
5    <description>OAuth Browser flow for connected app</description>
6    <externalAuthIdentityProviderParameter>
7        <parameterName>TokenUrl</parameterName>
8        <parameterType>TokenUrl</parameterType>
9        <parameterValue>https://localhost:6101/services/oauth2/token</parameterValue>
10        <sequenceNumber>1</sequenceNumber>
11    </externalAuthIdentityProviderParameter>
12    <externalAuthIdentityProviderParameter>
13        <parameterName>AuthorizeUrl</parameterName>
14        <parameterType>AuthorizeUrl</parameterType>
15        <parameterValue>https://localhost:6101/services/oauth2/authorize</parameterValue>
16        <sequenceNumber>2</sequenceNumber>
17    </externalAuthIdentityProviderParameter>
18    <label>exampleExtlIdp</label>
19</ExternalAuthIdentityProvider>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>ExternalAuthIdentityProvider</name>
6    </types>
7    <version>62.0</version>
8</Package>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.