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 Metadata and inherits its fields.

File Suffix and Directory Location 

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

Version 

Introduced in API version 62.0.

Special Access Rules 

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

Fields 

authenticationFlow 

  • Type: IdentityProviderAuthFlow (enumeration of type string)

  • Required: Yes

  • Description: Required.

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

  • Possible values:

    • AuthorizationCode
    • ClientCredentials
    • SalesforceDefined

authenticationProtocol 

  • Type: IdentityProviderAuthProtocol (enumeration of type string)

  • Required: Yes

  • Description: Required.

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

  • Possible values:

    • OAuth
    • SalesforceDefined

description 

  • Type: string
  • Required: No
  • Description: A meaningful description of the external auth identity provider.

externalAuthIdentityProviderParameters 

label 

  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the external auth identity provider.

ExternalAuthIdentityProviderParameter Type 

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.

Fields 

description 

  • Type: string
  • Required: No
  • Description: A human-readable description of this external auth identity provider parameter.

parameterName 

  • Type: string

  • Required: Yes

  • Description: Required.

    The name of the external auth identity provider parameter.

parameterType 

  • Type: ExtlIdentityProviderParmType (enumeration of type string)

  • Required: Yes

  • Description: Required.

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

  • Possible values:

    • AuthorizeRequestQueryParameter
    • AuthorizeUrl
    • ClientAuthentication
    • CreatedByNamespace
    • IdentityProviderOptions
    • ManagedByComponent
    • ManagedByFeature
    • RefreshRequestBodyParameter
    • RefreshRequestHttpHeader
    • RefreshRequestQueryParameter
    • StandardExternalIdentityProvider
    • TokenRequestBodyParameter
    • TokenRequestHttpHeader
    • TokenRequestQueryParameter
    • TokenUrl
    • UserInfoUrl

parameterValue 

  • Type: string
  • Required: No
  • Description: If the parameterType field describes a literal value, then this field stores the literal value.

sequenceNumber 

  • Type: int
  • Required: No
  • 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.