How to seamlessly access an ArcGIS Online map no-shared to public?

09-06-2016 10:38 AM
New Contributor II

My company is new to ArcGIS Online (AGOL). We tested using JavaScript API to access or embed an AGOL map shared only within our organization, and found it did not work unless we change the map to share to Public. This does not work for us as we won't want people outside our organization to discover/access the map. Is there a workaround this?

Tags (2)
0 Kudos
3 Replies
MVP Regular Contributor

Could you do something like this: 

OAuth Basic | ArcGIS API for JavaScript 3.17 

Then share the map only with the organization? 

Then the users would have to log in to see the map. 

0 Kudos
Esri Esteemed Contributor

Hi Allen,

You will need to include the IdentityManager module in your code.

This module returns a singleton class that is automatically instantiated into when the module containing this class is imported into the application. This module provides the framework and helper methods required to implement a solution for managing user credentials for the following resources:

  • ArcGIS Server resources secured using token-based authentication. Note that only ArcGIS Server versions 10 SP 1 and greater are supported.
  • Secured resources (i.e. web maps).
New Contributor II

Jake and Rickey, thanks for the hint. Our AGOL is integrated with AD through OKTA (SAML). Not sure if the sample code will work, but will give it a try. Here is the simple testing code that tries to access a map shared to our organization.


  ], function(MapView, WebMap, esriConfig, domReady){

    esriConfig.portalUrl = ""
    var webmap = new WebMap({
      portalItem: {
        id: "0d5f519dea1642429d3b358327f7e920"

    var view = new MapView({
      map: webmap,
      container: "viewDiv"


0 Kudos