Basemap permission problem ArcgisOnline WebMap

811
4
01-15-2018 10:49 AM
NathanMellor
Occasional Contributor

I expected this code to just plain work. 

        mbasemap = new Basemap("https://crittersoft.maps.arcgis.com/home/webmap/viewer.html?webmap=5c7b10ac1e1c4f9ca35efbb505235625");
        mbasemap.addLoadStatusChangedListener(this);
// create a map with the basemap
        ArcGISMap map = new ArcGISMap(mbasemap);

However it fails with an exception. 

"You do not have permissions to access this resource or perform this operation."

Can I not access my maps from ArcGISOnline in the Runtime? That was my whole reason for putting them in there. 

This webmap is shared with Everyone. 

Nathan

0 Kudos
4 Replies
NathanMellor
Occasional Contributor

Documentation states: "You can create maps, share maps, and load maps into your app from ArcGIS Online or from any organization's portal."

So tell me how to do it. 

0 Kudos
NathanMellor
Occasional Contributor

The code does work if I change it to. 

 mbasemap = new Basemap("https://www.arcgis.com/home/webmap/viewer.html?webmap=5c7b10ac1e1c4f9ca35efbb505235625");
0 Kudos
EricBader
Occasional Contributor III

Hi Nathan,

Access portal content—ArcGIS Runtime SDK for Android | ArcGIS for Developers  - This is a good topic when starting to work with accessing secured online content. Hope this is helpful!

0 Kudos
ShellyGill1
Esri Contributor

Hi Nathan,

If you're able to access your map via the ArcGIS.com URL, but not through your organization URL, I'd check your organizations settings. For example, settings like "Allow anonymous access to your organization". Possibly the ArcGIS Online documentation here may help - Configure security settings—ArcGIS Online Help | ArcGIS  - this indicates:

> "If you've disabled anonymous access to your organization, you can share maps, apps, and groups by sharing the item with everyone (public) and changing the URL of the item from your organization's private URL to the public ArcGIS Online URL (www.arcgis.com). For example, you could share one of your organization's maps with anonymous users by changing the URL from https://samplegis.maps.arcgis.com/home/webmap/viewer.html?webmap=fb39737f95a74b009e94d2274d44fd55 to https://www.arcgis.com/home/webmap/viewer.html?webmap=fb39737f95a74b009e94d2274d44fd55."
Sounds like it could be the issue you're seeing.

Hope this helps,

Shelly

0 Kudos