How to get the orgid for an organization without signing in?

6438
4
02-17-2014 08:49 PM
WhereMatters
Occasional Contributor
I know how to get the groupid for an ArcGIS Online Group. There are samples in the JavaScript API resource center, which show you how to get the group id.

But given a url to the organization portal, e.g., http://company.maps.arcgis.com,

how does one find the orgid of this organization without signing in, just to find all public items published by the organization?
Tags (2)
4 Replies
WhereMatters
Occasional Contributor
Never mind. I got it.

For private orgs, there is no way you can find the orgid without signing in, which makes perfect sense.

For public orgs, you just hit this url, http://odot.maps.arcgis.com/sharing/rest/portals/self?culture=en&f=pjson and it throws out everything about the organization including the orgid.

Try the above url for a private org without signing in, it still throws out some basic info about the org, but does not include the orgid.
BjornSvensson
Esri Regular Contributor
I'm not sure that is correct.  For example, I don't see a orgId when going directly to http://odot.maps.arcgis.com/sharing/rest/portals/self?culture=en&f=pjson.

I think the orgId is either part of the "user" or "appInfo" objects.  Both of which are only returned when a token is included in the request.

There is some documentation on this at http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Portal_Self/02r3000001m7000000/
0 Kudos
WhereMatters
Occasional Contributor
Bjorn,

Did you look at the key "id": "HdNMW2j6UI55aLXm" in the json returned by the request http://odot.maps.arcgis.com/sharing/rest/portals/self?culture=en&f=pjson.

Thats the orgid, its just named "id" instead of "orgid"
0 Kudos
BjornSvensson
Esri Regular Contributor
Thats the orgid, its just named "id" instead of "orgid"


I missed that. Thanks 🙂
0 Kudos