Authentication

ArcGIS supports secure access to location services and private data. It ensures that only valid, authorized users and applications access protected information. To access secure resources, implement an authentication method so your applications can make authenticated requests to services.

An authentication method is the process used obtain an access token. Your app must present an access token whenever it makes an authenticated request to location services. Access tokens define the scope and permissions available to your application. The authentication method you use to get an access token will vary.

There are three kinds of access tokens:

  • API key: a permanent token that grants your application access to ready-to-use services and, with an ArcGIS Developer account, private content (currently in beta).
  • ArcGIS identity (formerly named user): grants a short-lived token, generated via OAuth 2.0, giving your application permission to access the content and services authorized to an existing ArcGIS user's account.
  • Application credentials: grant a short-lived token, generated via OAuth 2.0, authorizing your application to access ready-to-use services.

To make authenticated requests to services, you need to set the token parameter to an access token.

ArcGIS identity

An ArcGIS identity, (formally known as a named user login), grant a temporary access token giving your application permission to access the content and services authorized to your application user's ArcGIS account. This temporary token is created using OAuth 2.0 protocol and authorizes your application to act on the user's behalf without revealing their secure password to your application. Any service usage is metered and billed to the authenticated user's ArcGIS subscription and, during the authenticated period, your app can access your user's content on their behalf.

Use ArcGIS identity when you want to:

  • Ensure users are signed in and authenticated with their own ArcGIS account.
  • Meter service usage to your app user's ArcGIS subscription to pay for their private data, content, or service transactions.
  • Limit the length of time users can be signed in to your app with a temporary token.

To set up OAuth 2.0 with ArcGIS identity:

For editor mode, there is a sample OAuth challenge handler that configures OAuth 2.0 with ArcGIS identity. To load private data in the Viewport during the editor time:

  1. Have an ArcGIS account, register an OAuth app, and have a set of Client ID and Redirect URI credentials for your ArcGIS identity to access a private layer. If you don't have an account, sign up for free.
  2. Open the Modes Panel UI and click on the Auth tab.
  3. In the Add Authentication Configuration section, set a name for the configuration and set the Client ID and the Redirect URI for the private content.
  4. Click on the Add button.
  5. Click on the tab where you have the private content, Basemap, Elevation, or Layers, and select the configuration name from the Authentication drop-down.
  6. Save and reload the level if the log in pop-up window is not displayed.

When you add a configuration, you can find it under the Authentication Configurations section. When you reload your level, a log in pop-up window will be opened. For adding basemap, elevation, and layers, see the Layers section.

For play mode, you should have another OAuth challenge handler for your own app. You can attach your own script or Sample OAuth Authentication Challenge Handler Component which uses the sample scripts to the Actor with the ArcGIS Map Component.

  1. Click on ArcGIS Map in the Outliner.
  2. In the Details panel, click on + Add button.
  3. Select Sample OAuth Authentication Challenge Handler.

When the private data is loaded, the log in pop-up window will open.


Learn more about ArcGIS identity

API keys

An API key is a long-term access token that you manually create, configure, and scope using the developer dashboard. Using API keys is typically the easiest way to access ArcGIS location services in your applications.

To use API keys, you need to have one of the following ArcGIS accounts:

  • ArcGIS Developer account
  • ArcGIS Online account

Use API keys when you want to:

  • Quickly write applications that consume ready-to-use services.
  • Provide access to services without requiring users to sign in with an ArcGIS account.
  • Use an access token that doesn't expire.
  • Meter service usage to the ArcGIS subscription that owns the API key.

To use API keys:

  1. You need an ArcGIS Developer account or ArcGIS Online account and an API key to access ArcGIS services. If you don't have an account, sign up for free.

  2. Open the Modes Panel UI in the Unreal Engine, and click on the Auth tab.

  3. Set the API key in the API Key field.

With the Modes Panel UI, the API key is used for all your content. If you want to use different API keys for each data, you should use Blueprints or the C++ API.



Learn more about API keys

Application credentials

Application credentials grant a short-lived access token, generated via OAuth 2.0, authorizing your application to access ready-to-use services, such as basemap layers, search, and routing.

Use application credentials when you want to:

  • Access ready-to-use services with a more secure process and a short-lived token.
  • Provide access to services without requiring users to have an ArcGIS account.
Learn more about Application credentials

Choose an authentication method

The choice of which type of authentication to implement is mostly dependent upon the resources required by your application.

ScenarioSolution
Your app requires access only to ready-to-use services, such as the basemap layer, geocoding, or routing services.API key
Your app allows users to view and edit private data in ArcGIS.ArcGIS identity
Your app is API backend and requires access only to basemaps and geocoding.Application credentials

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.