A portal is a website with tools that can be used to create, manage, access, and share geospatial content Content is a collection of items in a portal that belong to a user, group, or organization. Learn more and data. It supports many different types of content such as web maps A web map is a map stored as a JSON object that defines properties such as the basemap layer, data layers, layer styles, and pop-up styles. Its JSON structure is defined by the web map specification. Learn more , web scenes A web scene is a scene stored as a JSON object that defines properties such as the basemap layer, data layers, layer styles, and pop-up styles. Its JSON structure is defined by the web scene specification. Learn more , hosted layers A hosted layer is an item in a portal that contains the properties and settings for a hosted data service or a layer in a hosted data service. Learn more , data services Data 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. Learn more , and files. A portal also provides tools to create maps, scenes, and layers, import data, create data services Data 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. Learn more , and manage users and groups in the organization An 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. Learn more .

In addition, a portal includes security and authentication capabilities, comprised of access controls for that portal’s content, as well as authentication services for apps and users to gain access to a portal’s secured content and tools.

As a developer, you can use a portal to manage 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. Learn more and create content Content is a collection of items in a portal that belong to a user, group, or organization. Learn more and data services Data 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. Learn more for your applications.

ArcGIS Location Platform ArcGIS Location Platform, formerly known as ArcGIS Platform, is a Platform as a Service (PaaS) product that gives developers access to location services, APIs, and tools to build mapping and spatial analysis applications. It is subscription-based and requires an ArcGIS Location Platform account. Learn more ,ArcGIS Online ArcGIS 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. Learn more , and ArcGIS Enterprise ArcGIS Enterprise is a GIS mapping, analytics, data hosting, and content management product that can be hosted on-premise or in a cloud infrastructure. It includes software, applications, tools, APIs, and services for users and developers. Learn more all include portals which a developer can use to authenticate their apps and users, create or manage content, and control access to that content. For ArcGIS Location Platform and ArcGIS Online, the portal is hosted in Esri’s infrastructure. For ArcGIS Enterprise, the portal is hosted on infrastructure you control, either in the cloud or on-premises (the ArcGIS Enterprise instance must have the Portal for ArcGIS software component installed).

ArcGIS Online

With ArcGIS Online you can do things like:

  • Create web maps
  • Web enable your data
  • Control how your maps, data, and applications are shared
  • Find relevant and useful basemaps, data, and configurable GIS resources
  • Manage content and users in your organization

Once hosted, you can access your data as services from your ArcGIS Maps SDK for JavaScript ArcGIS Maps SDK for JavaScript, previously known as ArcGIS API for JavaScript, is a developer product for building mapping and spatial analysis applications for the web. Learn more applications. You can also use the JavaScript Maps SDK to create new content (items), search for users and groups, and manage sharing. Learn more about developing with ArcGIS Online in the ArcGIS Online Help.

ArcGIS for organizations

To access all the capabilities of ArcGIS Online, your organization An 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. Learn more can purchase a subscription. With a subscription to ArcGIS Online, organizations can manage all of their geographic content in a secure, cloud-based Esri environment. Members of the organization can use maps to explore data, create and share maps and apps, and publish their data as hosted web layers. Administrators customize the website, invite and add members to the organization, and manage resources.

Learn more about ArcGIS for organizations at ArcGIS Online.

ArcGIS Location Platform

ArcGIS Location Platform ArcGIS Location Platform, formerly known as ArcGIS Platform, is a Platform as a Service (PaaS) product that gives developers access to location services, APIs, and tools to build mapping and spatial analysis applications. It is subscription-based and requires an ArcGIS Location Platform account. Learn more provides developers a set of 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. Learn more , data services Data 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. Learn more , spatial analysis services Spatial analysis services are services that perform geometry and statistical analyses on feature and raster data. Learn more , and 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. Learn more that can be used to build location-aware applications. It includes similar capabilities as ArcGIS Online, but is designed for developers who want to build custom applications using Esri’s location services. With your ArcGIS Location Platform account, you have access to your portal at ArcGIS.com for development, testing, and deployment.

For more information on getting started with the JavaScript Maps SDK and ArcGIS Location Platform, see the ArcGIS Location Platform guide.

Portal items, users, and groups

ArcGIS Online is an information portal and is represented in the API by the Portal class. When you sign in to ArcGIS Online with an organization An 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. Learn more account, you see a specialized view that your organization administrator has configured for you, giving you access to maps, content, and other services specific to your organization. You can also access all your own content and services.

Portal items

ArcGIS Online and ArcGIS Enterprise can store many types of content. See supported items in the ArcGIS documentation for an exhaustive list. Perhaps the type most commonly used by apps is a web map—a JSON description of the data in a map, along with other display and behavioral properties. Other types include tile packages, feature collections, and services. Some types, such as globe documents and map templates, may only be relevant to desktop systems. Although you can access these types of data using ArcGIS Runtime API, you may not be able to use them on a mobile device.

Portal users

A registered user of a portal is represented in the API by the PortalUser class. When you sign in to a portal, you get information relating to the authenticated user from the portal class. Several options are available for signing in to a portal, such as OAuth 2.0, network credentials, API keys, and tokens. Two authentication patterns are available, these are:

Portal groups

Groups are a way to collaborate with other users who share a common interest. A user can create groups, join groups, and share items with those groups. Groups have titles, descriptions, thumbnails, and unique IDs to help users identify them. The sharing model within ArcGIS Online is based on groups. Groups are represented in the API by the PortalGroup class.

Connect to public content and services

To connect to ArcGIS Online and access public content anonymously, you can begin by creating a portal, without authenticating with the portal.

var portal = new Portal(); // Defaults to www.arcgis.com
portal.authMode = "anonymous"; // Set this for anonymous access (no login required)
portal.load().then(() => {
// Do something here
});

From here, you can access public content. For example, you can display a web map, or add a hosted layer from a PortalItem into your map. You can also search for content such as web maps, map services, groups, and users.

Some organizations share content publicly and allow anonymous access to that content; connect to publicly accessible content from such organizations by specifying the organization URL. For example:

var portal = new Portal("https://[organization-name].maps.arcgis.com");

Connect to secured content and services

Web applications that target organization An 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. Learn more users who are known to ArcGIS through user authentication, should use the IdentityManager class in conjunction with the OAuth class. This is the simplest way to handle all authentication challenges that ArcGIS supports. To authenticate a user to a portal using this approach, you must set an instance of the IdentityManager and register an instance of the OAuth class with it. You then create a portal object, indicating that authentication is required. Next, load the portal.

// Register the IdentityManager with an instance of a registered OAuthInfo object
var info = new OAuthInfo({
// Swap this ID out with a registered application's client ID
appId: "<insert appID here>",
});
identityManager.registerOAuthInfos([info]);
var portal = new Portal(); // Optionally, specify the url instead of the default www.arcgis.com
portal.authMode = "immediate"; // Setting authMode to immediate signs the user in once loaded
// Load portal
portal.load().then(() => {
// Do something once loaded
});

The portal object now has access to all the secure content for which the user has access rights and can be used to find out more information about the user, such as the user’s name, instead of the account user name. Additionally, information about the organization such as the name, banner image, description, and so on, can be displayed in the OAuth sign-in window. Web applications often make use of this information when a user connects to a specific portal, to show the user organization branding and context.

To access secure content, a web application needs to provide a way to sign in to the platform, a process often known as authentication. The recommended approach for authenticating a user known to the platform is to implement user authentication with OAuth 2.0. Web applications that target users who are unknown to ArcGIS can authenticate with the platform on behalf of the user by using an application login. OAuth 2.0 authentication is handled automatically by the IdentityManager class. If the IdentityManager has registered OAuthInfo and detects a secure resource, a challenge for authentication is issued. The user is shown a web form, allowing them to login using their platform credentials.

Typically, the portal object with the authenticated user is used throughout the session, to provide the web application with a view of a portal that is centered around a single user. A credential is generated once a user signs in and cached within their session for a default of two weeks. This can be updated by setting the OAuthInfo.expiration property. In addition, it is good practice to call IdentityManager.destroyCredentials() once finished.

If you do not wish to sign in each time the application launches, the OAuth login page provides an option to keep the user signed in. Doing this stores the token information in the browser’s local storage.

ArcGIS Enterprise

ArcGIS Enterprise provides you with the same core capabilities as ArcGIS Online although it can be installed and hosted on your own premises and behind a firewall for controlled distribution of content.

Connect to ArcGIS Enterprise portal

Connecting to an instance of ArcGIS Enterprise portal is done in a very similar way to connecting to ArcGIS Online and is represented in the API by the same Portal class. Set the portalUrl to the Enterprise portal website, along with an appropriate credential or authentication valid on that portal, or no credential or authentication if accessing public content anonymously.

// Set the default portalUrl value to the hostname of the on-premise portal
config.portalUrl = "https://myHostName.esri.com/arcgis";
// Create the portal instance
var portal = new Portal(); // Takes the default set in the config

ArcGIS Server

ArcGIS Server is a component of ArcGIS Enterprise. It is a complete and integrated server-based GIS, which allows you to publish various types of GIS services. These services can be used by a variety of clients, including web applications written using the ArcGIS Maps SDK for JavaScript ArcGIS Maps SDK for JavaScript, previously known as ArcGIS API for JavaScript, is a developer product for building mapping and spatial analysis applications for the web. Learn more . Some services provide similar functionality to that of ArcGIS Online. For example, you can create map layers based on map, feature, or WMS services, and perform geocoding, routing, or geoprocessing functions by using services hosted by ArcGIS Server.

Discover content and services on ArcGIS Server

Use the ArcGIS Services Directory to browse the available services on an ArcGIS Server site. Open the REST Services home page in a browser. For example, you can access an Esri-hosted server for various test services.

Please note, that these services are provided for testing and development purposes only. They should not be used on production environments.

Contact your ArcGIS Server system administrator if you’re uncertain about the server URL or ArcGIS instance.

Connect to ArcGIS Server

Connecting to ArcGIS Server is a little different from connecting to portals. Instead of connecting to the portal itself, you pass the URL of the service you want to use to a class designed to work with that service type.

For example, you can create a map layer by passing in the URL to a dynamic map service:

var maplayer = new MapImageLayer();
maplayer.url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer";

If you need to get access to the individual layers within this map service, you can access them via the MapImageLayer.sublayers property.

// Only includes the first sublayer from the map service
var maplayer = new MapImageLayer({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
sublayers: [
{
id: 0, // This accesses the first layer in the service
},
],
});

You can also work with the individual FeatureLayer of the service.

var featurelayer = new FeatureLayer({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0",
});

The above are just a couple ways to access ArcGIS Server services directly within the ArcGIS Maps SDK for JavaScript ArcGIS Maps SDK for JavaScript, previously known as ArcGIS API for JavaScript, is a developer product for building mapping and spatial analysis applications for the web. Learn more . Various layer types and how to work with them can be accessed in the API Reference.

Similar to working with ArcGIS Online or ArcGIS Enterprise hosted services, if the service is secured, valid credentials or authentication is required to access it.

Learn more about ArcGIS for Server

Authentication

Your web application may need to access secured resources that are restricted to authorized users. For example, your organization An 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. Learn more may host private data layers or feature services that are only accessible by verified users. You may also need to take advantage of premium ArcGIS Online services, such as routing, that require secured user access. ArcGIS provides many ways to secure access to your organization’s content and services. The ArcGIS Maps SDK for JavaScript ArcGIS Maps SDK for JavaScript, previously known as ArcGIS API for JavaScript, is a developer product for building mapping and spatial analysis applications for the web. Learn more provides full support for access to secured ArcGIS Server, ArcGIS Online, or ArcGIS Enterprise resources. For additional information on how to access secured resources in these environments with the ArcGIS Maps SDK for JavaScript ArcGIS Maps SDK for JavaScript, previously known as ArcGIS API for JavaScript, is a developer product for building mapping and spatial analysis applications for the web. Learn more , please refer to Authentication and secure resources.

Additional Resources

The following are additional resources that provide information on the various topics discussed above.

A listing of samples working with some of the concepts discussed above.