App authentication is a type of authentication that generates short-lived access tokens based on a set of OAuth credentials. The access tokens are associated with your ArcGIS account, and can be used to to authenticate requests to access secure ArcGIS services and items.
App authentication is typically implemented on a web server or in standalone console scripts. This is to avoid exposing the confidential client
and client
values contained within OAuth credentials. App authentication is not recommended for client applications without a web server, or in private applications that require users to sign in.
You can use app authentication to:
- Create web servers and automation scripts that access the portal service and spatial analysis services.
- Create public applications that do not require users to sign in.
- Build applications that access location services and items such as hosted layers and data services.
- Authenticate with an OAuth 2.0 process that provides better security than API key authentication.
- Access secure resources with the privileges of your ArcGIS account.
How app authentication works
Apps that implement app authentication submit requests for access tokens using an OAuth 2.0 client
and client
. These values are generated from OAuth credentials and should remain confidential at all times.
The high-level process of app authentication is as follows:
- Include a
client
and_id client
from OAuth credentials in your server script._secret - Create an endpoint for clients to request access tokens.
- When a client requests a token, submit a request to the token endpoint of your portal service.
- Deliver the resulting access token to the client.
- The client uses the access token to access secure resources.
OAuth credentials
OAuth credentials are an item used to support authentication workflows. They are required to implement user authentication and app authentication using OAuth 2.0 workflows.
Limitations
Service support
The following table provides an overview of the functionality available with each type of authentication:
API key authentication | User authentication | App authentication | |
---|---|---|---|
ArcGIS Location Services | |||
Data services (Item access) | |||
Spatial analysis services | 1 | 1 | |
Portal service (General privileges) | 1 | 1 | |
Portal service (Admin privileges) | 1 | 1 |
- 1. Supported with ArcGIS Online and ArcGIS Location Platform.
Account types
App authentication is available for ArcGIS Location Platform accounts, ArcGIS Online accounts, and ArcGIS Enterprise accounts.
To create OAuth credentials with an ArcGIS Online account, your account must have a role with the Assign privileges to OAuth 2.0 applications privilege. To learn more, go to the FAQ.
OAuth credentials
Item access privileges: OAuth credentials can be configured to access a maximum of 100 items.