---
schema_version: "1"
id: 421e423a90e920736f2d1ecbf06d21a76edf09cd095cabd961863f1a40bfcc01
title: Configure an OAuth 2.0 Device Flow for External Client Apps
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/meta_configure_device_flow_external_client_apps.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.meta_configure_device_flow_external_client_apps.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3b5ca29f833ed3f4584ab57882c9a1b26279a6cb045f9dc5238ac28d14a40cc8
description: Configure the Global OAuth Settings to include a device code, and enable the OAuth 2.0 device flow. OAuth 2.0 device flows integrate apps that run on devices with limited input or display capabilities, such as smart TVs, appliances, and other internet of things (IoT) devices. Command-line apps can also use this flow. Users can connect these apps to Salesforce by accessing a browser on a device with more advanced input capabilities, such as a desktop or mobile device.
products:
  - Security
  - Cross Cloud
release: "264"
---
# Configure an OAuth 2.0 Device Flow for External Client Apps

Configure the Global OAuth Settings to include a device code, and enable the OAuth 2.0 device flow. OAuth 2.0 device flows integrate apps that run on devices with limited input or display capabilities, such as smart TVs, appliances, and other internet of things (IoT) devices. Command-line apps can also use this flow. Users can connect these apps to Salesforce by accessing a browser on a device with more advanced input capabilities, such as a desktop or mobile device.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d86187e28">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d86187e28 ">To view all external client apps, view their settings, and edit their OAuth policies
              file</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d86187e28 ">View all External Client Apps, view their settings, and edit their policies</td>
          </tr>
        </tbody>
      </table>

To enable or disable an external client app plugin, you must first deploy an external client app on your Salesforce org. [Deploy an External Client App That References the Source Org’s Global OAuth Settings File](https://help.salesforce.com/s/articleView?id=xcloud.deploy_external_client_app_that_references_the_source_org.htm&release=264.0.0&type=5 "Deploy an external client app on a new org, and have it reference the source org’s credentials. To configure this relationship, edit the OAuth link in the OAuth settings file and remove the reference to the global OAuth settings file in the package.xml manifest file of the new org."), or [Deploy an External Client App with a New Global OAuth Settings File](https://help.salesforce.com/s/articleView?id=xcloud.deploy_external_client_app_with_global_settings_file.htm&release=264.0.0&type=5 "Deploy the source org’s metadata on an org with its own OAuth consumer. To configure the app, remove the OAuth link in the OAuth settings file and add a reference to the global OAuth settings file in the package.xml manifest file on the new org.").

This process is similar to the [OAuth 2.0 Device Flow for IoT Integration](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_device_flow.htm&release=264.0.0&type=5 "To integrate apps that run on devices with limited input or display capabilities, such as Smart TVs, appliances, and other IoT devices, use the OAuth 2.0 device flow. Command-line apps can also use this flow. Users can connect these apps to Salesforce by accessing a browser on a device with more advanced input capabilities, such as a desktop or mobile device.").

1. Open the external client app global OAuth settings file.
2. Set the isDeviceFlowEnabled field to true, and save the file.
3. Use a cURL request to get a device code.
    
    ```
    curl -X POST <org URL>/services/oauth2/token -d 'response_type=device_code&client_id=3MVG9AOp4kbriZOLTqSCO6pgdL3iEegchEYYc74zsqfvJuyTC1xy4IQiPAv_mU0rtwXKJt73Seybuvhj8Jrws&redirect_uri=https://www.example.com' | json_pp
    ```
    
    This call returns a verification URL, a user code, and a device code.
4. Visit the verification URL on a computer or mobile device, and enter the user code.
5. Use the device code to complete the flow using a cURL request.
    
    ```
    curl -X POST <org URL>/services/oauth2/token -d 'grant_type=device&client_id=3MVG9AOp4kbriZOLTqSCO6pgdL3iEegchEYYc74zsqfvJuyTC1xy4IQiPAv_mU0rtwXKJt73Seybuvhj8Jrws&code=<device code>' | json_pp
    ```
    
    The response includes a bearer token. Use this token to authorize in other flows.