---
schema_version: "1"
id: bf1898d03f8c21a9c0f64039cdfd158856bfcb736b7ddf852066968968e5852a
title: ExternalAuthIdentityProvider
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_externalauthidentityprovider.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_externalauthidentityprovider.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: ba98956ccc8fa8612cc231fa73a4f78bd70aabdc42bed6b2e0e187e62163e6cb
description: 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.
---
# 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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") 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
- ClientCredentials
- 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\[\]](#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
- ManagedByComponent
- ManagedByFeature
- RefreshRequestBodyParameter
- RefreshRequestHttpHeader
- RefreshRequestQueryParameter
- StandardExternalIdentityProvider
- TokenRequestBodyParameter
- TokenRequestHttpHeader
- TokenRequestQueryParameter
- TokenUrl
- UserInfoUrl





 |
| parameterValue | 

Field Type

string

Description

If the parameterType field describes a literal value, then this field stores the literal value.



 |
| 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.

<?xml version="1.0" encoding="UTF-8"?>
<ExternalAuthIdentityProvider xmlns="http://soap.sforce.com/2006/04/metadata">
    <authenticationFlow\>AuthorizationCode</authenticationFlow\>
    <authenticationProtocol\>OAuth</authenticationProtocol\>
    <description\>OAuth Browser flow for connected app</description\>
    <externalAuthIdentityProviderParameter\>
        <parameterName\>TokenUrl</parameterName\>
        <parameterType\>TokenUrl</parameterType\>
        <parameterValue\>https://localhost:6101/services/oauth2/token</parameterValue\>
        <sequenceNumber\>1</sequenceNumber\>
    </externalAuthIdentityProviderParameter\>
    <externalAuthIdentityProviderParameter\>
        <parameterName\>AuthorizeUrl</parameterName\>
        <parameterType\>AuthorizeUrl</parameterType\>
        <parameterValue\>https://localhost:6101/services/oauth2/authorize</parameterValue\>
        <sequenceNumber\>2</sequenceNumber\>
    </externalAuthIdentityProviderParameter\>
    <label\>exampleExtlIdp</label\>
</ExternalAuthIdentityProvider\>

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

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>ExternalAuthIdentityProvider</name\>
    </types\>
    <version\>62.0</version\>
</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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").