---
schema_version: "1"
id: f59f131d082bb9d5b0bba77db13b0f259c5dbf2ecf7fd508f3893cb450e83fde
title: ConnectedApp
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_connectedapp.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_connectedapp.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8a19d76ab6fb0c5f80c749ef8986fe44289cb28c4a27dc5a3c15a69f471eb6b2
description: Represents a connected app configuration. A connected app enables an external application to integrate with Salesforce using APIs and standard protocols, such as SAML, OAuth, and OpenID Connect. Connected apps use these protocols to authenticate, authorize, and provide single sign-on (SSO) for external apps. The external apps that are integrated with Salesforce can run on the customer success platform, other platforms, devices, or SaaS subscriptions.
---
# ConnectedApp

Represents a connected app configuration. A connected app enables an external application to integrate with Salesforce using APIs and standard protocols, such as SAML, OAuth, and OpenID Connect. Connected apps use these protocols to authenticate, authorize, and provide single sign-on (SSO) for external apps. The external apps that are integrated with Salesforce can run on the customer success platform, other platforms, devices, or SaaS subscriptions.

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.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Connected apps creation is restricted as of Spring ‘26. You can use existing connected apps during and after Spring ‘26. However, we recommend using [external client apps](https://help.salesforce.com/s/articleView?id=xcloud.external_client_apps.htm&language=en_US) instead. If you must continue creating connected apps, contact Salesforce Support.

See [New connected apps can no longer be created in Spring ‘26](https://help.salesforce.com/s/articleView?id=005228017&type=1&language=en_US) for more details.

## File Suffix and Directory Location

ConnectedApp components have the suffix .connectedApp and are stored in the connectedApps folder.

## Version

ConnectedApp components are available in API version 29.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d262374e111">Field Name</th>

              <th class="featureTableHeader  " id="d262374e114">Field Type</th>

              <th class="featureTableHeader  " id="d262374e117">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">attributes</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type"><span class="keyword parmname">canvasConfig</span></td>

              <td class="entry" headers="d262374e117" data-title="Description">A custom attribute of the connected app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"></td>

              <td class="entry" headers="d262374e114" data-title="Field Type"><a class="xref" href="#ConnectedAppCanvasConfig_title">AppCanvasConfig</a></td>

              <td class="entry" headers="d262374e117" data-title="Description">The configuration options of the connected app
                if it's exposed as a canvas app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">contactEmail</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">Required. The email address that Salesforce uses to contact you
                or your support team.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">contactPhone</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">The phone number for Salesforce to use to contact you.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">An optional description for your app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">iconUrl</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">Reserved for future
                use.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">infoUrl</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">An optional URL for a web page with more information about your app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">ipRanges</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type"><a class="xref" href="#connectedAppIpRange_title">ConnectedAppIpRange[]</a></td>

              <td class="entry" headers="d262374e117" data-title="Description">Specifies the ranges of IP addresses that can access the app without requiring the user
                to authenticate with the connected app. </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">label</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">Required. The name of the app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">logoUrl</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">An optional logo for the app. The logo appears with the app’s entry in the
                list of apps and on the consent page the user sees when authenticating.
                The URL must use HTTPS, and the logo can't be larger than 125 pixels high
                or 200 pixels wide. The default logo is a cloud.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">mobileStartUrl</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">Users are directed to this URL after they've authenticated when the app
                is accessed from a mobile device. If you don't give a URL, the user is sent to
                the app’s default start page after authentication completes. If the connected app
                that you’re creating is a canvas app, then you can leave this field blank. The Canvas
                App URL field contains the URL that gets called for the connected app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">oauthConfig</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type"><a class="xref" href="#connectedAppOauthConfig_title">connectedAppOauthConfig</a></td>

              <td class="entry" headers="d262374e117" data-title="Description">Specifies how your app communicates with Salesforce.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">oauthPolicy</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type"><a class="xref" href="#connectedAppOauthPolicy_title">ConnectedAppOauthPolicy</a></td>

              <td class="entry" headers="d262374e117" data-title="Description">Specifies OAuth access policies associated with your connected app. Available in API
                version 49.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">permissionSetName</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">Specifies the permissions required to perform different functions with the connected
                app. Available in API version 46.0 and later.<p class="p">You can assign
                  multiple permission sets to the connected app, but you must
                  enter each permission set name on a separate line. You can’t
                  enter the same permission set name more than one time for each
                  connected app.</p>
                <p class="p">You can also change a permission set by
                  replacing the current permission set with a new permission set.
                  Make sure that each permission set name assigned to the
                  connected app is unique.</p>
                <p class="p">You can delete individual
                  permission sets or remove all permission sets from a connected
                  app by entering an empty <span class="keyword parmname">permissionSetName</span>
                  string on deployment of the connected app: (<samp class="codeph nolang">&lt;permissionSetName&gt;&lt;/permissionSetName&gt;</samp>).</p>
                <p class="p">To
                  use this field, the <span class="keyword parmname">isAdminApproved</span> field
                  on the ConnectedAppOauthConfig subtype must be set to <samp class="codeph nolang">true</samp>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">plugin</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">The name of a custom Apex class that extends <samp class="codeph apex_code">Auth.ConnectedAppPlugin</samp> to customize the behavior of the app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">pluginExecutionUser</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">Specifies the user to run the plugin as. If the user isn’t authorized to use the
                connected app, use the <samp class="codeph nolang">authorize</samp> method. See the
                <span class="keyword parmname">ConnectedAppPlugin</span> class in the <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.apexcode.meta/apexcode/apex_namespace_Auth.htm" target="_blank">Apex Developer Guide</a>.
                Available in API version 46.0 and later.<p class="p">Enter a user that is part
                  of your org. Otherwise, the user is removed from this field when
                  you deploy the connected app. If you don’t want to specify a
                  user, you can leave this field empty.</p>
                <p class="p">To use this field in
                  an org, the ConAppPluginExecuteAsUser setting must be
                  enabled.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">profileName</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string[]</td>

              <td class="entry" headers="d262374e117" data-title="Description">Specifies the profile (base-level user permissions) required to perform different
                functions with the connected app. Available in API version 46.0 and
                later.<p class="p">You can assign multiple profiles to the connected app,
                  but you must enter each profile name on a separate line. You
                  can’t enter the same profile name more than one time for each
                  connected app. </p>
                <p class="p">You can also change profiles by replacing
                  the current profiles with new profiles. Make sure that each
                  profile name assigned to the connected app is unique.</p>
                <p class="p">You
                  can also delete individual profiles or remove all profiles from
                  a connected app by entering an empty
                  <span class="keyword parmname">profileName</span> string on deployment of the
                  connected app: (<samp class="codeph nolang">&lt;profileName&gt;&lt;/profileName&gt;</samp>).
                </p>
                <p class="p">To use
                  this field, the <span class="keyword parmname">isAdminApproved</span> field on
                  the ConnectedAppOauthConfig subtype must be set to <samp class="codeph nolang">true</samp>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">samlConfig</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type"><a class="xref" href="#connectedAppSamlConfig_title">ConnectedAppSamlConfig</a></td>

              <td class="entry" headers="d262374e117" data-title="Description">Controls how the app uses single sign-on.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">sessionPolicy</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type"><a class="xref" href="#connectedAppSessionPolicy_title">ConnectedAppSessionPolicy</a></td>

              <td class="entry" headers="d262374e117" data-title="Description">Specifies a connected app’s session policies.
                Available in API version 49.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e111" data-title="Field Name"><span class="keyword parmname">startUrl</span></td>

              <td class="entry" headers="d262374e114" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e117" data-title="Description">If the app isn’t accessed from a mobile device, users are directed to this
                URL after they've authenticated. If you don't give a URL, the user is sent
                to the app’s default start page after authentication completes. Whether you
                give a URL or not, the start URL can be updated later by managing the
                connected app. If the app is accessed from a mobile device, see
                <span class="keyword parmname">mobileStartUrl</span>. If the connected app that you’re
                creating is a canvas app, then you can leave this field empty.
                The Canvas App URL field contains the URL that gets called for the
                connected app.
              </td>

            </tr>

          </tbody>

        </table>

## ConnectedAppAttribute

Represents the field names that make up a custom attribute when using SAML with a ConnectedApp. Customize these values to a specific service provider.

| Field Name | Field Type | Description |
| --- | --- | --- |
| formula | string | Required. The value of the attribute. |
| key | string | Required. The attribute's identifier. |

## ConnectedAppCanvasConfig

Represents the configuration options of the connected app if it's exposed as a canvas app.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d262374e552">Field Name</th>

              <th class="featureTableHeader  " id="d262374e555">Field Type</th>

              <th class="featureTableHeader  " id="d262374e558">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d262374e552" data-title="Field Name"><span class="keyword parmname">accessMethod</span></td>

              <td class="entry" headers="d262374e555" data-title="Field Type">AccessMethod (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)
              </td>

              <td class="entry" headers="d262374e558" data-title="Description">Required. Indicates how the canvas app initiates the OAuth authentication flow.
                The valid values are:<a name="AccessMethod_values"><!-- --></a>
                <ul class="ul bulletList" id="AccessMethod_values">
                  <li class="li">
                    <samp class="codeph nolang">Get</samp>—OAuth
                    authentication is used, and the user is prompted to allow the
                    third-party application to access their information. When you
                    use this access method, the canvas app must initiate the
                    OAuth authentication flow.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Post</samp>—OAuth
                    authentication is used, but when the administrator installs the
                    canvas app, they implicitly allow access for users. Therefore,
                    the user isn’t prompted to allow the third party to access their
                    user information. When you use this access method, the
                    authentication is posted directly to the canvas app URL.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e552" data-title="Field Name"><span class="keyword parmname">canvasUrl</span></td>

              <td class="entry" headers="d262374e555" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e558" data-title="Description">Required. The URL of the third-party app that's exposed as a canvas app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e552" data-title="Field Name"><span class="keyword parmname">lifecycleClass</span></td>

              <td class="entry" headers="d262374e555" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e558" data-title="Description">
                <span class="ph" id="lifecycle_class_desc"><a name="lifecycle_class_desc"><!-- --></a>The name of the <samp class="codeph nolang">Canvas.CanvasLifecycleHandler</samp> Apex class, if you've implemented
                  this class for custom parameters.</span>
                <p class="p">Available in API version 31.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e552" data-title="Field Name"><span class="keyword parmname">locations</span></td>

              <td class="entry" headers="d262374e555" data-title="Field Type">CanvasLocationOptions (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)[]</td>

              <td class="entry" headers="d262374e558" data-title="Description">Indicates where the canvas app can appear to the user. The valid values are:<a name="CanvasLocationOptions_values"><!-- --></a>
                <ul class="ul bulletList" id="CanvasLocationOptions_values">
                  <li class="li">
                    <samp class="codeph nolang">Aura</samp>—The canvas app can appear in a custom
                    Lightning component.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">AppLauncher</samp>—Reserved for future use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Chatter</samp>—The canvas app can appear in the
                    app navigation list on the Chatter tab in Salesforce
                    Classic.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ChatterFeed</samp>—The canvas app can appear as a Chatter feed item.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">MobileNav</samp>—The canvas app can appear in a mobile card in the Salesforce mobile app. Available in API version 31.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">None</samp>—The canvas app can appear only in the Canvas App Previewer.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">OpenCTI</samp>—The canvas app can appear in the
                    call control tool in Salesforce Classic.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PageLayout</samp>—The canvas app can appear on a page layout. When viewed in the Salesforce mobile app, the canvas app
                    appears in the record detail page. Available in API version 31.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Publisher</samp>—The canvas app can appear as a global action.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ServiceDesk</samp>—The canvas app can appear in
                    the footer or sidebars of a console in Salesforce
                    Classic.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">UserProfile</samp>—Reserved for future use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Visualforce</samp>—The canvas app can appear on a Visualforce page.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e552" data-title="Field Name"><span class="keyword parmname">options</span></td>

              <td class="entry" headers="d262374e555" data-title="Field Type">CanvasOptions (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)[]</td>

              <td class="entry" headers="d262374e558" data-title="Description">Indicates whether to hide the <strong class="ph uicontrol">Share</strong> button and header in the publisher for your canvas app and whether the app is a canvas personal app. Valid
                values are:<a name="options_values"><!-- --></a>
                <ul class="ul bulletList" id="options_values">
                  <li class="li">
                    <samp class="codeph nolang">HideShare</samp>—The <strong class="ph uicontrol">Share</strong> button is hidden in the publisher for the related canvas app. Available
                    in API version 30.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">HideHeader</samp>—The header is hidden in the publisher for the related canvas app. Available in API version 30.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PersonalEnabled</samp>—End users can install the app as a canvas personal app. Available in API version 32.0 and
                    later.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e552" data-title="Field Name"><span class="keyword parmname">samlInitiationMethod</span></td>

              <td class="entry" headers="d262374e555" data-title="Field Type">SamlInitiationMethod (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d262374e558" data-title="Description">
                <span class="ph" id="saml_initiation_method_desc"><a name="saml_initiation_method_desc"><!-- --></a>If you're using SAML single sign-on (SSO), indicates which provider initiates the SSO flow.</span><a name="saml_initiation_method_options"><!-- --></a>
                <ul class="ul bulletList" id="saml_initiation_method_options">
                  <li class="li">
                    <samp class="codeph nolang">IdpInitiated</samp>—Identity provider initiated. Salesforce makes the initial request to start the SSO flow.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">SpInitiated</samp>—Service provider initiated. The canvas app starts the SSO flow after it's invoked.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">None</samp>—The canvas app isn't using SAML SSO. Available in API version 31.0 and later.
                  </li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## ConnectedAppIpRange

Represents the list of IP addresses that can access the app without requiring the user to authenticate.

| Field Name | Field Type | Description |
| --- | --- | --- |
| description | string | Identifies the purpose of the range, such as which part of a network corresponds to this range. Available in API version 31.0 and later. |
| end | string | Required. The last address in the IP range, inclusive. |
| start | string | Required. The first address in the IP range, inclusive. |

## ConnectedAppOauthConfig

Represents the field names that configure how your connected app communicates with Salesforce.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d262374e893">Field Name</th>

              <th class="featureTableHeader  " id="d262374e896">Field Type</th>

              <th class="featureTableHeader  " id="d262374e899">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">assetTokenConfig</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type"><a class="xref" href="#connectedAppOauthAssetToken_title">connectedAppOauthAssetToken</a></td>

              <td class="entry" headers="d262374e899" data-title="Description">The OAuth asset token configuration for the connected app OAuth
                settings. Available in API version 49.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">callbackUrl</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e899" data-title="Description">Required. The endpoint that Salesforce calls back to your
                connected app during OAuth. It’s the OAuth <samp class="codeph nolang">redirect_uri</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">certificate</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e899" data-title="Description">The PEM-encoded certificate string, if the app uses a
                certificate.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">consumerKey</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e899" data-title="Description">A value used by the consumer for identification to Salesforce.
                Referred to as <samp class="codeph nolang">client_id</samp> in
                OAuth 2.0.<p class="p">In API version 32.0 and later, you can set this field’s
                  value only during creation. <span class="ph" id="consumerKey_field_desc2"><a name="consumerKey_field_desc2"><!-- --></a>After you define and save the value, it can’t be edited.
                    The value must be alphanumeric, can’t contain special
                    characters or spaces, and must be between 8–256 characters.
                    Consumer keys must be globally unique.</span></p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname"><span class="ph" id="consumerSecret_field_name"><a name="consumerSecret_field_name"><!-- --></a>consumerSecret</span></span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e899" data-title="Description">
                <span class="ph" id="consumerSecret_field_desc"><a name="consumerSecret_field_desc"><!-- --></a>A value that is combined with
                  the <span class="keyword parmname">consumerKey</span> and used by the consumer
                  for identification to Salesforce. Referred to as <samp class="codeph nolang">client_secret</samp> in OAuth 2.0.
                  Typically, Salesforce generates this value when you create the
                  connected app. However, you can customize the shared secret
                  value during creation. After you save the value, it can’t be
                  edited. When set, the value isn’t returned in Metadata API
                  requests.</span>
                <p class="p"><span class="ph" id="consumerSecret_field_desc2"><a name="consumerSecret_field_desc2"><!-- --></a>The value
                    must be alphanumeric (no special characters and no spaces)
                    and a minimum of 8 characters (maximum of 256 characters).
                    If you specify a secret already in use for another connected
                    app in the organization, an error
                    occurs.</span></p>
                <p class="p">Available in API version 32.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">idTokenConfig</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type"><a class="xref" href="#connectedAppOauthIdToken_title">ConnectedAppOauthIdToken</a></td>

              <td class="entry" headers="d262374e899" data-title="Description">Specifies the ID token configuration for the connected app OAuth
                settings. Available in API version 43.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isAdminApproved</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">false</samp> (default),
                anyone in the org can authorize the app. Users must approve the app
                the first time they access it.<p class="p">If set to <samp class="codeph nolang">true</samp>, only users with the
                  appropriate profile or permission set can access the app. These
                  users don’t have to approve the app before they can access it.
                  Manage profiles for the app by editing each profile’s Connected
                  App Access list. Manage permission sets for the app by editing
                  each permission set’s Assigned Connected App list. This setting
                  isn’t available in Group Edition. Available in API version 46.0
                  and later.</p>

                <p class="p">Connected app consumers can edit this setting when deploying a
                  connected app in their org.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isClientCredentialEnabled</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">true</samp>, the
                connected app can use the OAuth 2.0 client credentials flow. To use
                the client credentials flow, you must also specify a user for
                <span class="keyword parmname">oauthClientCredentialUser</span>.<p class="p">If set to
                  <samp class="codeph nolang">false</samp> (default), the
                  connected app can’t use the client credentials
                  flow.
                </p>
                <p class="p">Available in API version 56.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isCodeCredentialEnabled</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">Determines whether the app can use the Authorization Code and
                Credentials Flow to provide identity services to headless,
                off-platform apps. The Authorization Code and Credentials Flow is
                the foundation of headless login, headless registration, headless
                passwordless login, and headless guest identity. <p class="p">If set to
                  <samp class="codeph nolang">true</samp>, the connected app
                  can use the Authorization Code and Credentials Flow and all
                  associated Headless Identity features. The default value is
                  <samp class="codeph nolang">false</samp>.
                </p>
                <p class="p">This field
                  is available in API version 57.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isCodeCredentialPostOnly </span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">For the Authorization Code and Credentials Flow, determines
                whether the user’s credentials must be sent in the body of the
                initial HTTPS POST request to the Salesforce authorization endpoint.
                Requiring the credentials in the POST body instead of in the header
                improves security.<p class="p">If set to <samp class="codeph nolang">true</samp>, the user’s credentials must be included in
                  the POST body. The default value is <samp class="codeph nolang">false</samp>.</p>
                <p class="p">This field is available in API
                  version 57.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isConsumerSecretOptional</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">false</samp> (default),
                the connected app’s client secret is required in exchange for an
                access token in the OAuth 2.0 web server flow.<p class="p">If the client app
                  can’t keep the client secret confidential and it must use the
                  web server flow, set to <samp class="codeph nolang">true</samp>. A client secret is still generated for the
                  connected app, but this setting instructs the web server flow
                  not to require the <samp class="ph systemoutput">client_secret</samp>
                  parameter in the access token request. We recommend the user
                  agent flow as a more secure option than web server flow without
                  the secret. Available in API version 49.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isIntrospectAllTokens</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">true</samp>, authorizes
                the connected app to introspect all access and refresh tokens within
                the entire org.<p class="p">If set to <samp class="codeph nolang">false</samp> (default), the connected app can introspect
                  its own tokens. In addition, an OAuth client that directly
                  registers OAuth 2.0 connected apps through the dynamic client
                  registration endpoint can check the tokens for itself and its
                  registered apps. Available in API version 49.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isNamedUserJwtEnabled</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">true</samp>, the connected app is enabled to
                issue JSON Web Token (JWT)-based access tokens.<p class="p">This field is
                  generally available in API version 59.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isPkceRequired</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">Determines whether the Proof Key for Code Exchange (PKCE)
                extension is required for variations of the OAuth 2.0 authorization
                code flow configured for the connected app, including the web server
                flow and Authorization Code and Credentials Flow. For public client
                apps that can’t keep the consumer secret confidential, such as
                mobile apps, the PKCE extension helps ensure that the client that
                initiates an authorization flow is the same client that completes
                it. For this reason, we always recommend implementing PKCE for
                public clients. We also strongly recommend that you implement PKCE
                for private clients.<p class="p">If set to <samp class="codeph nolang">true</samp>, the PKCE extension is required and any
                  authorization code flow variations that don’t implement it fail.
                  If set to <samp class="codeph nolang">false</samp>, you can
                  still implement PKCE but it isn’t required. The default value is
                  <samp class="codeph nolang">false</samp>.
                </p>
                <p class="p">This field
                  is available in API version 59.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isRefreshTokenRotationEnabled</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">true</samp>, the connected app issues a new
                refresh token each time the OAuth refresh token flow is invoked. The
                old refresh token is automatically invalidated. If a user tries to
                use a previous refresh token that’s been invalidated, the current
                refresh token and its associated access tokens get deleted. If set
                to <samp class="codeph nolang">false</samp>, the refresh token can
                be used to obtain multiple access tokens.<p class="p">This field is available
                  in API version 60.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isSecretRequiredForRefreshToken</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">true</samp> (default),
                the app’s client secret is required in the authorization request of
                a refresh token and hybrid refresh token flow. If set to <samp class="codeph nolang">false</samp> and an app sends the client
                secret in the authorization request, Salesforce still validates it.
                <p class="p">Select this option for web-server based apps that can protect
                  client secrets. For apps that can’t protect client secrets, such
                  as mobile apps or apps installed on a user’s computer, we
                  recommend against selecting this option. Available in API
                  version 51.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isSecretRequiredForTokenExchange</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">true</samp>, the connected app must include
                its consumer secret (<samp class="codeph nolang">client_secret</samp>) in the token request during the OAuth
                2.0 token exchange flow. For security, set this field to <samp class="codeph nolang">true</samp> only if your app has a private
                client backend where it can keep the secret safe. For public client
                apps, such as single-page apps and mobile apps, set this field to
                <samp class="codeph nolang">false</samp> and don’t include the
                consumer secret.<p class="p">This field is available in API version 60.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">isTokenExchangeEnabled</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">boolean</td>

              <td class="entry" headers="d262374e899" data-title="Description">If set to <samp class="codeph nolang">true</samp>, the connected app can use the
                OAuth 2.0 token exchange flow to exchange tokens from an external
                identity provider for Salesforce tokens.<p class="p">This field is available
                  in API version 60.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">oauthClientCredentialUser</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e899" data-title="Description">The execution user for the OAuth 2.0 client credentials flow.
                Salesforce returns access tokens on behalf of this user. This user
                must have the API Only permission.<p class="p">To use this field, set
                  <span class="keyword parmname">isClientCredentialEnabled</span> to <samp class="codeph nolang">true</samp> and specify a
                  <span class="keyword parmname">consumerKey</span>.
                </p>
                <p class="p">Available in API
                  version 56.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">scopes</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">ConnectedAppOauthAccessScope (enumeration of type
                string)[]</td>

              <td class="entry" headers="d262374e899" data-title="Description">The permissions given by the user running the connected app. When
                deploying metadata, valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Basic</samp>—Allows
                    access to your identity URL service (the same behavior as
                    deploying <samp class="codeph nolang">Address</samp>,
                    <samp class="codeph nolang">Email</samp>, <samp class="codeph nolang">Phone</samp>, and <samp class="codeph nolang">Profile</samp>).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Api</samp>—Allows
                    access to the logged-in user's account over the APIs.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Web</samp>—Allows use
                    of the <samp class="codeph nolang">access_token</samp> on
                    the web. This usage also includes <samp class="codeph nolang">visualforce</samp>, allowing
                    access to Visualforce pages.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Full</samp>—Allows
                    access to all data accessible by the logged-in user.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Chatter</samp>—Allows
                    access to only the Connect REST API resources.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomApplications</samp>—Provides access to
                    custom applications, such as those using Visualforce.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">RefreshToken</samp>—Allows a refresh token to be
                    returned if you’re eligible to receive one (the same
                    behavior as deploying <samp class="codeph nolang">OfflineAccess</samp>).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">OpenID</samp>—Allows
                    access to the logged-in user's unique identifier for OpenID
                    Connect apps.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Profile</samp>—Allows
                    access to the logged-in user's profile (the same behavior as
                    deploying <samp class="codeph nolang">Basic</samp>).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Email</samp>—Allows
                    access to the logged-in user's email address (the same
                    behavior as deploying <samp class="codeph nolang">Basic</samp>).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Address</samp>—Allows
                    access to the logged-in user's street address (the same
                    behavior as deploying <samp class="codeph nolang">Basic</samp>).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Phone</samp>—Allows
                    access to the logged-in user's phone number value (the same
                    behavior as deploying <samp class="codeph nolang">Basic</samp>).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">OfflineAccess</samp>—Allows the app to interact
                    with the user's data while the user is offline and get a
                    refresh token (the same behavior as deploying <samp class="codeph nolang">RefreshToken</samp>).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomPermissions</samp>—<span class="ph" id="scope_custom_perm_desc"><a name="scope_custom_perm_desc"><!-- --></a>Allows access to the custom
                      permissions in an organization associated with the
                      connected app and shows whether the current user has
                      each permission enabled.</span>
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Wave</samp>—Allows
                    access to the Analytics REST API resources. Available in API
                    version 35.0 and later.
                  </li>

                  <li class="li"><span class="ph" id="eclair_scope"><a name="eclair_scope"><!-- --></a><samp class="codeph nolang">Eclair</samp>—Allows access to the
                      Analytics REST API Charts Geodata resource. Available in
                      API version 35.0 and later.</span></li>

                  <li class="li"><span class="ph" id="pardot_scope"><a name="pardot_scope"><!-- --></a><samp class="codeph nolang">Pardot</samp>—Allows access to Pardot API
                      services on behalf of the user. The full extent of
                      accessible services is managed by the Pardot account.
                      Available in API version 49.0 and later.</span></li>

                  <li class="li"><span class="ph" id="lightning_scope"><a name="lightning_scope"><!-- --></a><samp class="codeph nolang">Lightning</samp>—Allows hybrid apps to
                      directly obtain Lightning child sessions through the
                      OAuth 2.0 hybrid app token flow and hybrid app refresh
                      token flow. Available in API version 51.0 and
                      later.</span></li>

                  <li class="li"><span class="ph" id="content_scope"><a name="content_scope"><!-- --></a><samp class="codeph nolang">Content</samp>—Allows hybrid apps to
                      directly obtain content child sessions through the OAuth
                      2.0 hybrid app token flow and hybrid app refresh token
                      flow. Available in API version 51.0 and later.</span></li>

                  <li class="li"><span class="ph" id="CDPIngest"><a name="CDPIngest"><!-- --></a><samp class="codeph nolang">CDPIngest</samp>—Allows access to Data
                      Cloud ingest API services. Customers use these API
                      services to upload and maintain external datasets in the
                      <span class="ph">Data 360</span>. Available in API version 52.0 and
                      later.</span></li>

                  <li class="li"><span class="ph" id="chatbot_scope"><a name="chatbot_scope"><!-- --></a><samp class="codeph nolang">Chatbot</samp>—Allows access to Einstein
                      Bot API services. Available in API version 54.0 and
                      later.</span></li>

                  <li class="li">
                    <samp class="codeph nolang">ForgotPassword</samp>—Allows
                    access to Headless Forgot Password API. Assign to an
                    internal integration user to get an access token for
                    authenticated requests to this API. Available in API version
                    57.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">UserRegistration</samp>—Allows
                    access to Headless Registration API. Assign to an internal
                    integration user to get an access token for authenticated
                    requests to this API. Available in API version 58.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PwdlessLogin</samp>—Allows
                    access to Headless Passwordless Login API. Assign to an
                    internal integration user to get an access token for
                    authenticated requests to this API. Available in API version
                    59.0 and later.
                  </li>

                </ul>
                <p class="p">When retrieving metadata, valid values are:</p>
                <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Api</samp>—Allows
                    access to the logged-in user’s account over the APIs.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Basic</samp>—Allows
                    access to the user’s identity URL service, and includes
                    <samp class="codeph nolang">Address</samp>, <samp class="codeph nolang">Email</samp>, <samp class="codeph nolang">Phone</samp>, and <samp class="codeph nolang">Profile</samp>.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Chatter</samp>—Allows
                    access to only the Connect REST API resources.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomApplications</samp>—Allows access to custom
                    applications, such as those using Visualforce.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Full</samp>—Allows
                    access to all data accessible by the logged-in user.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">OpenID</samp>—Allows
                    access to the logged-in user's unique identifier for OpenID
                    Connect apps.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CDPIngest</samp>—Allows access to Data
                    Cloud ingest API services. Customers use these API
                    services to upload and maintain external datasets in the
                    <span class="ph">Data 360</span>. Available in API version 52.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Pardot</samp>—Allows access to Pardot API
                    services on behalf of the user. The full extent of
                    accessible services is managed by the Pardot account.
                    Available in API version 49.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Lightning</samp>—Allows hybrid apps to
                    directly obtain Lightning child sessions through the
                    OAuth 2.0 hybrid app token flow and hybrid app refresh
                    token flow. Available in API version 51.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Content</samp>—Allows hybrid apps to
                    directly obtain content child sessions through the OAuth
                    2.0 hybrid app token flow and hybrid app refresh token
                    flow. Available in API version 51.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">RefreshToken</samp>—Allows a refresh token to be
                    returned if you’re eligible to receive one and is synonymous
                    with allowing <samp class="codeph nolang">OfflineAccess</samp>.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Wave</samp>—Allows
                    access to the Analytics REST API resources. Available in API
                    version 35.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Eclair</samp>—Allows access to the
                    Analytics REST API Charts Geodata resource. Available in
                    API version 35.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Web</samp>—Allows usage
                    of the <samp class="codeph nolang">access_token</samp> on
                    the web. This usage also includes <samp class="codeph nolang">visualforce</samp>, allowing
                    access to Visualforce pages.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Chatbot</samp>—Allows access to Einstein
                    Bot API services. Available in API version 54.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ForgotPassword</samp>—Allows
                    access to Headless Forgot Password API. Assign to an
                    internal integration user to get an access token for
                    authenticated requests to this API. Available in API version
                    57.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">UserRegistration</samp>—Allows
                    access to Headless Registration API. Assign to an internal
                    integration user to get an access token for authenticated
                    requests to this API. Available in API version 58.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PwdlessLogin</samp>—Allows
                    access to Headless Passwordless Login API. Assign to an
                    internal integration user to get an access token for
                    authenticated requests to this API. Available in API version
                    59.0 and later.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e893" data-title="Field Name"><span class="keyword parmname">singleLogoutUrl</span></td>

              <td class="entry" headers="d262374e896" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e899" data-title="Description">The single logout endpoint. This URL is the endpoint where
                Salesforce sends a logout request when users log out of
                Salesforce.</td>

            </tr>

          </tbody>

        </table>

## ConnectedAppOauthAssetToken

Specifies an OAuth asset token configuration for the connected app OAuth settings. Available in API version 49.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| assetAudiences | string | Required. The audience claim associated with the asset token payload. This claim identifies who the JWT is intended for. Value is an array of case-sensitive strings, each containing a StringOrURI value. An audience is specified for each intended consumer of the asset token. |
| assetIncludeAttributes | boolean | Required. If set to true (default), custom attributes associated with the connected app are included in the asset token payload. If set to false, these attributes aren’t included. |
| assetIncludeCustomPerms | boolean | Required. If set to true (default), custom permissions associated with the connected app are included in the asset token payload. If set to false, these permissions aren’t included. |
| assetSigningCertId | string | Required. The ID of the JWT certificate’s signing secret. The certificate size can’t exceed 4 KB. If it does, try using a DER encoded file to reduce the size. |
| assetValidityPeriod | int | Required. The asset token’s validity period. The validity must be the expiration time of the assertion within 3 minutes, expressed as the number of seconds from 1970-01-01T0:0:0Z measured in UTC. |

## ConnectedAppOauthIdToken

Specifies the ID token configuration for the connected app OAuth settings. Available in API version 43.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| idTokenAudience | string | The audiences that this ID token is intended for. The value is an array of case-sensitive strings. If no audiences are specified, the OAuth 2.0 client\_id of the relying party is returned as the default audience. Otherwise, the other audiences are returned with the client\_id in the aud value. |
| idTokenIncludeAttributes | boolean | Indicates whether attributes are included in the ID token. |
| idTokenIncludeCustomPerms | boolean | Indicates whether custom permissions are included in the ID token. |
| idTokenIncludeStandardClaims | boolean | Indicates whether standard claims about the authentication event are included in the ID token. |
| idTokenValidity | int | The length of time that the ID token is valid for after it’s issued. The value can be from 1 to 720 minutes. The default is 2 minutes. |

## ConnectedAppOauthPolicy

Specifies OAuth access policies for the connected app. Available in API version 49.0 and later.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d262374e1894">Field Name</th>

              <th class="featureTableHeader  " id="d262374e1897">Field Type</th>

              <th class="featureTableHeader  " id="d262374e1900">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d262374e1894" data-title="Field Name"><span class="keyword parmname">ipRelaxation</span></td>

              <td class="entry" headers="d262374e1897" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e1900" data-title="Description">Required. Specifies whether a user’s access to the connected app is restricted by IP ranges. Valid options are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">ENFORCE</samp> (default)—Enforces the IP restrictions configured for the org, such as the IP ranges assigned to a user
                    profile.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">BYPASS_2FACTOR</samp>—Allows a user running the app to bypass the org’s IP restrictions when either of these conditions is true.<ul class="ul bulletList">
                      <li class="li">The app has a list of allowed IP ranges and is using the web server OAuth authorization flow. Requests coming from only these IPs are allowed.</li>

                      <li class="li">The app doesn’t have a list of allowed IP ranges, but it uses the web server authentication flow. And the user successfully completes identity
                        verification if accessing Salesforce from a new browser or device.</li>

                    </ul>
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">BYPASS</samp>—Allows a user to run this app without org IP restrictions.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ENFORCE_RELAXREFRESH</samp>—Enforces the IP restrictions configured for the org, such as the IP ranges assigned to a user
                    profile. However, this option bypasses these restrictions when the connected app uses refresh tokens to get access tokens.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e1894" data-title="Field Name"><span class="keyword parmname">refreshTokenPolicy</span></td>

              <td class="entry" headers="d262374e1897" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e1900" data-title="Description">Required. Specifies how long a refresh token is valid for. <p class="p">If refresh tokens are provided, users can continue to access the OAuth-enabled connected app without
                  having to reauthorize when the access token expires, as defined by the session timeout value. The connected app exchanges the refresh token with an access token to
                  start a new session. The Refresh Token policy is evaluated only during usage of the issued refresh token and doesn’t affect a user’s current session. Refresh tokens
                  are required only when a user’s session has expired or isn’t available. For example, you set a refresh token policy to expire the token after 1 hour. If a user uses
                  the app for 2 hours, the user isn’t forced to reauthenticate after 1 hour. However, the user is required to authenticate again when the session expires and the
                  client attempts to exchange its refresh token for a new session.</p>

                <p class="p">Valid options are:</p>

                <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">zero</samp>—The refresh token is invalid immediately. The user can use the current session (access token) already
                    issued, but can’t obtain a new session when the access token expires.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">infinite</samp>—The refresh token is used indefinitely, unless revoked by the user or Salesforce admin. Default
                    setting.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">specific_lifetime:<var class="keyword varname">number</var>:<var class="keyword varname">HOURS, DAYS, MONTHS</var></samp>—The refresh token is valid
                    for a fixed amount of time. For example, if the policy states <samp class="codeph nolang">specific_lifetime:1:DAYS</samp>, the user can obtain new
                    sessions for only 24 hours.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">specific_inactivity:<var class="keyword varname">number</var>:<var class="keyword varname">HOURS, DAYS, MONTHS</var></samp>—The refresh token is valid
                    as long as it’s been used within the specified amount of time. For example, if set to <samp class="codeph nolang">specific_inactivity:7:DAYS</samp>, and
                    the refresh token isn’t exchanged for a new session within seven days, the next attempt to use the token fails. The expired token can’t generate new
                    sessions. If the refresh token is exchanged within seven days, the token is valid for another seven days. The monitoring period of inactivity also
                    resets.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e1894" data-title="Field Name"><span class="keyword parmname">singleLogoutUrl</span></td>

              <td class="entry" headers="d262374e1897" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e1900" data-title="Description">If single logout is enabled, specify the single logout URL. Salesforce sends logout requests to this URL when users log out of Salesforce. The single logout URL must
                be an absolute URL starting with <samp class="ph systemoutput">https://</samp>.</td>

            </tr>

          </tbody>

        </table>

## ConnectedAppSamlConfig

Specifies how an app uses single sign-on.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d262374e2050">Field Name</th>

              <th class="featureTableHeader  " id="d262374e2053">Field Type</th>

              <th class="featureTableHeader  " id="d262374e2056">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">acsUrl</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2056" data-title="Description">Required. The assertion consumer service URL from the service provider.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">certificate</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2056" data-title="Description">The PEM-encoded certificate string, if the app uses a certificate.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">encryptionCertificate</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2056" data-title="Description">
                <span class="ph" id="encryption_cert_desc"><a name="encryption_cert_desc"><!-- --></a>The name of the certificate to use for encrypting SAML assertions to the service provider. This certificate is saved in the
                  organization's Certificate and Key Management list.</span> Available in API version 30.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">encryptionType</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">
                <p class="p">SamlEncryptionType</p>
                (enumeration of type string)
              </td>

              <td class="entry" headers="d262374e2056" data-title="Description">
                <span class="ph" id="encryptType_desc"><a name="encryptType_desc"><!-- --></a>When Salesforce is the identity provider, the SAML
                  configuration can specify the encryption method used for
                  encrypting SAML assertions to the service provider. The service
                  provider detects the encryption method in the SAML assertion for
                  decryption. Valid values are:</span><a name="encryptType_desc_list"><!-- --></a>
                <ul class="ul bulletList" id="encryptType_desc_list">
                  <li class="li">
                    <samp class="codeph nolang">AES_128</samp>—128–bit key
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">AES_256</samp>—256–bit key
                  </li>

                </ul>
                Available in API version 30.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">entityUrl</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2056" data-title="Description">Required. The entity ID from your service provider.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">issuer</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2056" data-title="Description">
                <span class="ph" id="issuer_desc"><a name="issuer_desc"><!-- --></a>A URI that sends the SAML response. A service provider can use this URI to determine which identity provider sent the response.</span> Available
                in API version 29.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">samlIdpSLOBindingEnum</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">SamlIdpSLOBinding (enumeration of type string)</td>

              <td class="entry" headers="d262374e2056" data-title="Description">The SAML HTTP binding type from the service provider used for single logout. Available in API version 40.0 and later. Valid values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">PostBinding</samp></li>

                  <li class="li"><samp class="codeph nolang">RedirectBinding</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">samlNameIdFormat</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">SamlNameIdFormatType (enumeration of type string)</td>

              <td class="entry" headers="d262374e2056" data-title="Description">
                <span class="ph" id="samlNameIdFormat_desc"><a name="samlNameIdFormat_desc"><!-- --></a>Indicates the format the service provider (SP) requires for the user's single sign-on identifier.</span> Available in API version
                29.0 and later. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Unspecified</samp> (default)—No format given.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">EmailAddress</samp>—Used if the subject type is the user's name or a federation ID (an ID internal to the SP).
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Persistent</samp>—Used with the user ID and persistent ID subject types.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Transient</samp>—Used when the subject type is a custom attribute and can change every time the user logs in.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">samlSigningAlgoType</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">SamlSigningAlgoType (enumeration of type string)</td>

              <td class="entry" headers="d262374e2056" data-title="Description">Indicates the signing algorithm applied to SAML requests and responses when Salesforce is the identity provider. The selected signing algorithm is applied to both
                single sign-on and single logout responses from your org. Available in API version 50.0 and later. Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">SHA1</samp></li>

                  <li class="li"><samp class="codeph nolang">SHA256</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">samlSloUrl</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2056" data-title="Description">The SAML single-logout endpoint of the connected app service provider (SP). This endpoint is where SAML LogoutRequests and LogoutResponses are sent when users log
                out of Salesforce. The SP provides this endpoint. Available in API version 40.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">samlSubjectCustomAttr</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2056" data-title="Description">
                <span class="ph" id="samlSubjectCustomAttr_desc"><a name="samlSubjectCustomAttr_desc"><!-- --></a>If the <span class="keyword parmname">samlSubjectType</span> is <samp class="codeph nolang">CustomAttr</samp>, include that custom value here;
                  otherwise, leave empty.</span> Available in API version 29.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2050" data-title="Field Name"><span class="keyword parmname">samlSubjectType</span></td>

              <td class="entry" headers="d262374e2053" data-title="Field Type">SamlSubjectType (enumeration of type string)</td>

              <td class="entry" headers="d262374e2056" data-title="Description">Required. The single sign-on identifier for the user. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Username</samp>—The user's Salesforce name.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">FederationId</samp>—The user's identifier at the service provider. Get this value from the service provider.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">UserId</samp>—The user's 15-character
                    Salesforce identifier.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PersistentID</samp>—A persistent opaque identifier that is specific to the identity provider and a service provider.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomAttr</samp>—The identifier is taken from a custom field value in <span class="keyword parmname">samlSubjectCustomAttr</span>.
                  </li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## ConnectedAppSessionPolicy

Specifies the configuration options for a connected app’s session policies. Use these policies to define how long a user’s session can last before reauthenticating, to block user access to the connected app, or to require multi-factor authentication (MFA) to access the app. Available in API version 49.0 and later.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d262374e2350">Field Name</th>

              <th class="featureTableHeader  " id="d262374e2353">Field Type</th>

              <th class="featureTableHeader  " id="d262374e2356">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d262374e2350" data-title="Field Name"><span class="keyword parmname">policyAction</span></td>

              <td class="entry" headers="d262374e2353" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2356" data-title="Description">If the High Assurance session security level is applied to the connected app, specify associated high assurance action. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Block</samp>—Makes the connected app inaccessible to your org’s users. Blocking an app ends all current user sessions with
                    the connected app and prevents all new sessions.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">RaiseSessionLevel</samp>—Requires users to verify their identity with multi-factor authentication when they log in to the
                    connected app. This setting applies to authorization flows that include a user approval step for API logins. These flows are the OAuth 2.0 refresh token flow,
                    web server flow, and user-agent flow. All other flows, such as the JSON Web Token (JWT) bearer token flow, don’t include a user approval step. For flows without
                    a user approval step, API logins with the High Assurance session security level are blocked.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2350" data-title="Field Name"><span class="keyword parmname">sessionLevel</span></td>

              <td class="entry" headers="d262374e2353" data-title="Field Type">string</td>

              <td class="entry" headers="d262374e2356" data-title="Description">Applies the High Assurance session security level to the connected app. This session level requires users to verify their identity with multi-factor authentication
                when they log in to the connected app.</td>

            </tr>

            <tr>
              <td class="entry" headers="d262374e2350" data-title="Field Name"><span class="keyword parmname">sessionTimeout</span></td>

              <td class="entry" headers="d262374e2353" data-title="Field Type">int</td>

              <td class="entry" headers="d262374e2356" data-title="Description">The length of time the connected app’s session lasts. If you don’t set a value, Salesforce uses the timeout value in the connected app user’s profile. If the user’s
                profile doesn’t specify a timeout value, Salesforce uses the timeout value in the org’s Session Settings.</td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a ConnectedApp component.

<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <attributes\>
        <formula\>$Api.Enterprise\_Server\_URL\_100</formula\>
        <key\>test</key\>
    </attributes\>
    <attributes\>
        <formula\>$Api.Partner\_Server\_URL\_60</formula\>
        <key\>test1</key\>
    </attributes\>
   <canvasConfig\>
        <accessMethod\>Get</accessMethod\>
        <canvasUrl\>https://salesforce.com</canvasUrl\>
        <lifecycleClass\>MyCanvasListener</lifecycleClass\>
        <locations\>Chatter</locations\>
        <locations\>Visualforce</locations\>
        <locations\>Aura</locations\>
        <locations\>Publisher</locations\>
        <locations\>ChatterFeed</locations\>
        <locations\>OpenCTI</locations\>
        <locations\>MobileNav</locations\>
        <locations\>PageLayout</locations\>
        <options\>HideShare</options\>
        <options\>HideHeader</options\>
        <options\>PersonalEnabled</options\>
        <samlInitiationMethod\>None</samlInitiationMethod\>
    </canvasConfig\>
    <canvas\>
    	<locationOptions\>NONE</locationOptions\>
    	<samlInitiationMethod\>None</samlInitiationMethod\>
    	<accessMethod\>Get</accessMethod\>
    	<canvasOptions\>PE</canvasOptions\>
    	<lifecycleClass\>MyCanvasListener</lifecycleClass\>
    	<canvasUrl\>https://salesforce.com</canvasUrl\>
	</canvas\>
    <contactEmail\>example@salesforce.com</contactEmail\>
    <contactPhone\>1231231234</contactPhone\>
    <description\>Test App</description\>
    <iconUrl\>https://c1.sfdcstatic.com/content/dam/sfdc-docs/www/logos/salesforce-logo-cloud.png</iconUrl\>
    <infoUrl\>https://c1.sfdcstatic.com/content/dam/sfdc-docs/www/logos/salesforce-logo-cloud.png</infoUrl\>
    <startUrl\>https://www.salesforce.com</startUrl\>
    <ipRanges\>
        <end\>000.0.0.1</end\>
        <start\>000.0.0.2</start\>
	<description\>Test</description\>
    </ipRanges\>
    <ipRanges\>
        <end\>000.0.0.1</end\>
        <start\>000.0.0.2</start\>
	<description\>Test1</description\>
    </ipRanges\>
    <label\>TestApp</label\>
    <logoUrl\>https://c1.sfdcstatic.com/content/dam/sfdc-docs/www/logos/salesforce-logo-cloud.png</logoUrl\>
    <profileName\>Test</profileName\>
    <permissionSetName\>TestPermission</permissionSetName\>
    <mobileStartUrl\>http://www.mobile.com</mobileStartUrl\>
    <mobileAppConfig\>
        <applicationBinaryFile\></applicationBinaryFile\>
        <applicationBinaryFileName\>test</applicationBinaryFileName\>
        <applicationBundleIdentifier\>testtest</applicationBundleIdentifier\>
        <applicationIconFileName\>test</applicationIconFileName\>
	<applicationIconFile\>test</applicationIconFile\>
	<applicationFileLength\>5</applicationFileLength\>
        <applicationInstallUrl\>https://salesforce.com</applicationInstallUrl\>
        <devicePlatform\>ios</devicePlatform\>
        <deviceType\>minitablet</deviceType\>
        <minimumOsVersion\>2</minimumOsVersion\>
        <privateApp\>true</privateApp\>
        <version\>2</version\>
    </mobileAppConfig\>
    <oauthConfig\>
        <assetTokenConfig\>
            <assetAudiences\>http://asset.audience.com</assetAudiences\>
            <assetIncludeAttributes\>true</assetIncludeAttributes\>
            <assetIncludeCustomPerms\>true</assetIncludeCustomPerms\>
            <assetSigningCertId\>${cert.id}</assetSigningCertId\>
            <assetValidityPeriod\>1440</assetValidityPeriod\>
        </assetTokenConfig\>
        <callbackUrl\>https://www.callback.com</callbackUrl\>
        <!--  NOTE, TEST.orgId will get replaced with the org ID of the context org, so we will have a unique consumer key in every scratch org.  -->
        <consumerKey\>3MVG9AOp4kbriZOcnmoLmTrguy9ryzcLbBjoNY...${TEST.orgId}</consumerKey\>
		<consumerSecret\>3MVG9AOp4k...</consumerSecret\>
		<certificate\>3MVG9AOp4kbriZOInmoLmTrguy9ryzcLbBjoNY...</certificate\>
        <scopes\>Basic</scopes\>
        <scopes\>Chatter</scopes\>
        <scopes\>OpenID</scopes\>
        <scopes\>CustomPermissions</scopes\>
		<singleLogoutUrl\>https://www.logout.com</singleLogoutUrl\>
        <isAdminApproved\>false</isAdminApproved\>
        <isConsumerSecretOptional\>false</isConsumerSecretOptional\>
        <isIntrospectAllTokens\>false</isIntrospectAllTokens\>
		<idTokenConfig\>
			<idTokenAudience\>https://idtoken.audience.com</idTokenAudience\>
			<idTokenIncludeAttributes\>true</idTokenIncludeAttributes\>
			<idTokenIncludeCustomPerms\>true</idTokenIncludeCustomPerms\>
			<idTokenIncludeStandardClaims\>true</idTokenIncludeStandardClaims\>
			<idTokenValidity\>20</idTokenValidity\>
		</idTokenConfig\>
    </oauthConfig\>
    <oauthPolicy\>
        <ipRelaxation\>ENFORCE</ipRelaxation\>
        <refreshTokenPolicy\>infinite</refreshTokenPolicy\>
        <singleLogoutUrl\>https://www.logout.com</singleLogoutUrl\>
    </oauthPolicy\>
    <plugin\>ConnectedAppPluginTest</plugin\>
    <pluginExecutionUser\>testuser@salesforce.com</pluginExecutionUser\>
    <samlConfig\>
        <acsUrl\>http://www.acs.com</acsUrl\>
        <encryptionType\>AES\_128</encryptionType\>
	<encryptionCertificate\>3MVG9AOp4kbriZOInmoLmTrguy9ryzcLbBjoNY...</encryptionCertificate\>
	<certificate\>3MVG9AOp4kbriZOInmoLmTrguy9ryzcLbBjoNY...</certificate\>
	<samlSubjectCustomAttr\>test</samlSubjectCustomAttr\>
        <entityUrl\>http://www.entity.com</entityUrl\>
        <issuer\>https://salesforce.com</issuer\>
        <samlIdpSLOBindingEnum\>RedirectBinding</samlIdpSLOBindingEnum\>
        <samlNameIdFormat\>Unspecified</samlNameIdFormat\>
        <samlSloUrl\>https://www.salesforce.com</samlSloUrl\>
        <samlSubjectType\>CustomAttribute</samlSubjectType\>
    </samlConfig\>
    <sessionPolicy\>
        <policyAction\>RaiseSessionLevel</policyAction\>
        <sessionLevel\>HIGH\_ASSURANCE</sessionLevel\>
        <sessionTimeout\>720</sessionTimeout\>
    </sessionPolicy\>
</ConnectedApp\>

You can enter multiple callback URL values. At run time, Salesforce validates the callback URL specified by the app by matching it with one of the values. You must separate each callback URL with line breaks. To enter a new line programmatically, use the \\r line break character.

Here's an example of a ConnectedApp component with multiple callback URLs.

<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
 <contactEmail\>example@salesforce.com</contactEmail\>
 <label\>MyConnectedApp</label\>
 <oauthConfig\>
 <callbackUrl\>https://example.com/callback1
https://example.com/callback2
https://example.com/callback3</callbackUrl\>
 <consumerKey\>3MVG9AOp4kbriZOcnmoLmTrguy9ryzcLbBjoNY...</consumerKey\>
 <isAdminApproved\>false</isAdminApproved\>
 <isConsumerSecretOptional\>false</isConsumerSecretOptional\>
 <isIntrospectAllTokens\>false</isIntrospectAllTokens\>
 <isSecretRequiredForRefreshToken\>true</isSecretRequiredForRefreshToken\>
 <scopes\>Full</scopes\>
 <scopes\>RefreshToken</scopes\>
 </oauthConfig\>
 <oauthPolicy\>
 <ipRelaxation\>ENFORCE</ipRelaxation\>
 <refreshTokenPolicy\>infinite</refreshTokenPolicy\>
 </oauthPolicy\>
</ConnectedApp\>

The following is an example package manifest used to deploy or retrieve the ConnectedApp metadata for an organization.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>PortalTestApp</members\>
        <name\>ConnectedApp</name\>
    </types\>
    <version\>29.0</version\>
</Package\>

## Usage

If you're constructing a SAML-enabled connected app using Metadata API, and must set the IdP-Initiated Login URL for your service provider, you have two options:

You can use the service provider app ID with the app parameter in the following format. This value is displayed in the Salesforce user interface. From Setup, enter Connected Apps in the Quick Find box, then select **Connected Apps**, then click the name of the connected app to see its detail page.

https://<Salesforce\_base\_URL>/idp/login?app=<app\_id>

Or, if you're configuring the connected app using Metadata API only, you can use the apiName parameter of the service provider app in the following format. The apiName parameter is the fullName inherited from the Metadata type.

https://<Salesforce\_base\_URL>/idp/login?apiName=<fullName>

## 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.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).