This topic provides an overview of the key concepts and terminology you should be familiar with before implementing authentication in your applications.
Security in ArcGIS
ArcGIS is a secure system that requires authentication to access all secure apps, content, data, and services. It implements industry-standard protocols to ensure that only authorized users and applications can access secure resources
Some common workflows that use security in ArcGIS are:
- ArcGIS users sign in to apps such as ArcGIS Pro
ArcGIS Pro is a professional desktop GIS application that can explore, visualize, analyze, and manage 2D and 3D data. , Map ViewerMap Viewer is a browser-based mapping tool that can view, create, and save web maps. It can also perform mapping, visualization, and spatial analysis operations. and Scene ViewerScene Viewer(™) is a browser-based mapping tool that can view, create, and save web scenes. . - Developers create custom applications that use authentication to access secure resources
A secure resource is any item or service in an ArcGIS that requires an ArcGIS account and authentication to access. Examples include ArcGIS Location Services, and items and data services in an ArcGIS portal. . - Administrators manage the privileges
Privileges are a set of permissions assigned to ArcGIS accounts, developer credentials, and applications that grant access to secure resources and functionality in ArcGIS. and roles of users to enhance security within their organizationAn organization a list of members from the same business, association, or entity who can sign in, access tools and applications, and collaborate with other members in a portal. All members have an ArcGIS account and are approved by an administrator to access the same portal. . - Members of an organization upload and share
Sharing level is the security setting assigned to an item in a portal that controls which users can access the resource. The sharing levels are Owner, Organization, Groups, and Everyone. content securely in a portalArcGIS portal, also known as a portal, is a website with applications and tools that can be used to create, manage, access, and share geospatial content and data. It supports security and authentication, developer credentials, content and data service management, user and group management, and site administration. A portal can be hosted in Esri's infrastructure or your own infrastructure. .
What is authentication?
Authentication is the process of verifying the identity of a user or application in ArcGIS. Authentication allows users and applications to access secure resources such as a portal
Authorization is the process of verifying client privileges
How authentication works
ArcGIS uses token-based authentication for all requests. Authentication works by interacting with a portal service
The general process of authentication includes the following:
- Authenticate with a portal
ArcGIS portal, also known as a portal, is a website with applications and tools that can be used to create, manage, access, and share geospatial content and data. It supports security and authentication, developer credentials, content and data service management, user and group management, and site administration. A portal can be hosted in Esri's infrastructure or your own infrastructure. to get an access token. - Use the access token to authorize requests to secure resources.
Below is a sample HTTP request to access a secure resource in ArcGIS with an access token
https://<SERVICE_URL>?token=<YOUR_ACCESS_TOKEN>
Types of authentication
ArcGIS supports three types of authentication to get an access token

API key authentication

User authentication

App authentication
Authentication comparison
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 | 1 | 1 | 1 |
| Data services (Item access) | 2 | ||
| Spatial analysis services | 1 | 1 | |
| Portal service (General privileges) | |||
| Portal service (Admin privileges) |
- 1. Supported with ArcGIS Online and ArcGIS Location Platform.
- 2. Supported, but not recommended due to security risks.
Terminology
This section contains important terminology you should be familiar with before implementing authentication in your apps.
ArcGIS accounts
You need an ArcGIS account
| ArcGIS Location Platform account | ArcGIS Online account | ArcGIS Enterprise account | |
|---|---|---|---|
| API key authentication | 1 | 2 | |
| User authentication | |||
| App authentication | 1 | 2 |
- 1. Requires an administrator account or a custom role with developer privileges.
- 2. Supported in ArcGIS Enterprise 11.4 or greater. Requires an administrator account or a custom role with developer privileges.
If you are using an ArcGIS Online
Types of applications
From a security perspective, the type of application you build is defined by its sharing level and its target audience. This classification determines the appropriate authentication method for your application, as well as the privileges and resources your app can access.
Public application
A public application is an app that allows user access anonymously
Developers with an ArcGIS Online or ArcGIS Enterprise account may choose to omit authentication in public apps if the application only accesses items and resources with a sharing level
Private application
A private application is an application that requires users to sign in with an ArcGIS account
Developer credentials
Developer credentials
You can use developer credentials to:
- Create, regenerate, and invalidate API keys
An API key is a long-lived access token created using API key credentials. They are valid for up to one year and are typically embedded directly into client applications. in API key authenticationAPI key authentication is a type of authentication that uses an API key to authenticate requests to ArcGIS services and secure portal items. . - Obtain an OAuth 2.0
OAuth 2.0 is an industry standard protocol for authorization. It defines how to obtain and manage credentials for web, desktop, and mobile applications. It is supported by ArcGIS. client ID for user authenticationUser authentication is a type of authentication that allows users with an ArcGIS account to sign into an application and allow it to access ArcGIS content, services, and resources on their behalf. The typical authorization protocol used is OAuth2.0. . - Obtain an OAuth 2.0
OAuth 2.0 is an industry standard protocol for authorization. It defines how to obtain and manage credentials for web, desktop, and mobile applications. It is supported by ArcGIS. client ID and client secret for app authenticationApp authentication is a type of authentication that grants a short-lived access token based on an OAuth 2.0 client ID and client secret, authorizing an application to access ArcGIS services and items. . - Define the privileges
Privileges are a set of permissions assigned to ArcGIS accounts, developer credentials, and applications that grant access to secure resources and functionality in ArcGIS. and itemAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. access of your application. - Authorize redirect URIs and referrer domains to improve application security.
Privileges
A privilege
Privileges can be applied to ArcGIS accounts and developer credentials:
- Privileges for users: Privileges define the capabilities and permissions for users
An ArcGIS user is a user who has an ArcGIS account and uses it to access an ArcGIS application, custom ArcGIS application, or a resource in an ArcGIS portal. in an organization. They are determined by the user type and role assigned to the account. - Privileges for developer credentials: Privileges defined for developer credentials
Developer credentials are a type of item in a portal that contains parameters for authentication. There are two types of developer credentials: API key credentials and OAuth credentials. for custom applications you are building. They determine the capabilities and permissions of the access tokensAn access token is an authorization string that provides access to secure ArcGIS content, data, and services. Its capabilities are determined by the privileges it supports. It is obtained by implementing API key authentication, User authentication, or App authentication. used by your applications.
Access tokens
An access token
Example of an access token:
AAPTKUgfudpnh_cXrZ7wRiqGE4q0VCQENKpafTPqVh27cldNPiqORWEyVueCmI67s3ebSNEYl0Sn3IitIyf18X8PxF3N8m9ZE30i5iwGHtGfnv6-DoKA-C8-lJ9GM30s-Wxn75jLBdnQnMjIgwVXEjIoualIMSfk4IWraDv3GMV8XP3fAUA73P23Vfs-THx2QjfDNVD3iuGCqLG0udK_TVLchskcBFVbsj1PRWXGcFaKKzdPkwWMXps_4P_cZEBAZdImAT1_L1aY2CIyPortal
An ArcGIS portal
The portal supports the following security features:
- Membership: Only members can sign in, view content, access applications and tools, and participate in the organization/portal.
- Item sharing levels: Item sharing levels
Sharing level is the security setting assigned to an item in a portal that controls which users can access the resource. The sharing levels are Owner, Organization, Groups, and Everyone. can be private, group, organization, or public. Only users with the correct privileges can access items in a portal. - Groups: Members can create groups to share items with specific members.
- Roles: Administrators can grant custom roles to a member with privileges that specify that items, tools, and applications the member is allowed to access.
Additionally, a portal's underlying portal service
Secure resources
The following resources are secure and require authentication to access:
-
Portal: A portal is secure and requires users and applications to sign in. The underlying portal service
A portal service provides the functionality to securely create, access, and manage content, data services, users, and groups in a portal. The service can be hosted by Esri or in ArcGIS Enterprise. is also secure and requires authentication to access. -
Secure items: All content items
An item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. in a portalArcGIS portal, also known as a portal, is a website with applications and tools that can be used to create, manage, access, and share geospatial content and data. It supports security and authentication, developer credentials, content and data service management, user and group management, and site administration. A portal can be hosted in Esri's infrastructure or your own infrastructure. are secure and may require authentication depending on their sharing levelSharing level is the security setting assigned to an item in a portal that controls which users can access the resource. The sharing levels are Owner, Organization, Groups, and Everyone. . Items can also be shared with specific groups in an organization. -
ArcGIS services: All ArcGIS services hosted in Esri's infrastructure are secure, including location services
ArcGIS Location Services, also referred to as Location Services, are services hosted by Esri that provide geospatial functionality for developing mapping applications. They include the ArcGIS Basemap Styles service, ArcGIS Static Basemap Tiles service, ArcGIS Places service, ArcGIS Geocoding service, ArcGIS Routing service, ArcGIS GeoEnrichment service, and ArcGIS Elevation service. An ArcGIS Location Platform or ArcGIS Online account is required to use the services. , spatial analysis servicesSpatial analysis services are services that perform geometry and statistical analyses on feature and raster data. , data servicesData services, also known as hosted data services, are services created dynamically to store and provide access to your data in ArcGIS. Examples are feature services, vector tile services, map tile services, image services, and scene services. , and the portal serviceA portal service provides the functionality to securely create, access, and manage content, data services, users, and groups in a portal. The service can be hosted by Esri or in ArcGIS Enterprise. . -
ArcGIS Enterprise services: All ArcGIS Enterprise services hosted in your own infrastructure are secure.
-
Low/No-code applications: Applications built using low/no-code builders are hosted in a portal
ArcGIS portal, also known as a portal, is a website with applications and tools that can be used to create, manage, access, and share geospatial content and data. It supports security and authentication, developer credentials, content and data service management, user and group management, and site administration. A portal can be hosted in Esri's infrastructure or your own infrastructure. and secure and may require authentication depending on their sharing levelSharing level is the security setting assigned to an item in a portal that controls which users can access the resource. The sharing levels are Owner, Organization, Groups, and Everyone. . -
ArcGIS tools: All ArcGIS tools
Tools, also known as developer tools, are ArcGIS software applications such as portal and ArcGIS Pro that developers can use to prepare content and data for custom applications they are building. are secure, such as ArcGIS ProArcGIS Pro is a professional desktop GIS application that can explore, visualize, analyze, and manage 2D and 3D data. , Map ViewerMap Viewer is a browser-based mapping tool that can view, create, and save web maps. It can also perform mapping, visualization, and spatial analysis operations. , Scene ViewerScene Viewer(™) is a browser-based mapping tool that can view, create, and save web scenes. . -
Subscriber and premium content: Subscriber content is a type of secure item
An item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. hosted in ArcGIS Living Atlas that requires an ArcGIS OnlineArcGIS Online is a GIS mapping, analytics, data hosting, and content management software as a service (SaaS) product. It includes applications, tools, APIs, and location services for users and developers. It is subscription-based and requires an ArcGIS Online account. account. Premium content is a subtype of subscriber content that consumes credits.
Tutorials
Create an API key
Create and configure API key credentials to get a long-lived API key access token.
Create OAuth credentials for user authentication
Create OAuth credentials for app authentication
API support
- 1. Supported via ArcGIS REST JS