guilherme.pigosso@hotmail.com

Simple map load fail for Organization Account

Discussion created by guilherme.pigosso@hotmail.com on Nov 4, 2018

Hello,

 

I am having issues to load a map from my organization. In my first tests, I tried with maps from public account and have no problem. But now, with the organization account, when the screen to login appers, I can't use my organization account (only a public account) and, after login, I have an issue that I'm not able to see the map (issue expected, as I couldn't login using the organization account). The error is something like this:

dojo.js:310 [esri.WebMap] #load() Failed to load web map

  1. {name: "webmap:load-portal-item", message: "Failed to load portal item", details: {…}}
    1. details:
      1. error: e
        1. details: {error: e, ssl: false}
        2. message: "You are currently signed in as: 'guilherme'. You do not have access to this resource: https://mydomain.maps.arcgis.com/sharing/rest/content/items/22cf203432584ed4b7d6189f952d6t80"
        3. name: "identity-manager:not-authorized"
        4. __proto__: b
      2. __proto__: Object
    2. message: "Failed to load portal item"
    3. name: "webmap:load-portal-item"

 

My code is:

[...]

<link rel="stylesheet" href="https://js.arcgis.com/4.9/esri/css/main.css">

<script src="https://js.arcgis.com/4.9/"></script>
<script src="http://code.jquery.com/jquery-3.3.1.min.js"></script>

<script>
   require([
      "esri/views/MapView",
      "esri/WebMap",
      "esri/config"
   ], function(MapView, WebMap, esriConfig) {

 

      esriConfig.portalUrl = "https://mydomain.maps.arcgis.com";
      var webmap = new WebMap({
         portalItem: {
            id: "22cf203432584ed4b7d6189f952d6t80",
            type: "Web Mapping Application"
         }
      });


      var view = new MapView({
         map: webmap,
         container: "viewDiv"
      });
   });
</script>

[...]

 

Any idea how to fix it? I'm trying to "redict the login" to my organization, but no idea if it is the right way to do it and even if it is possible!

 

Thank you in advance!

Outcomes