Select to view content in your preferred language

How to retrieve the orgid

2684
1
Jump to solution
04-23-2019 01:31 PM
MitchellOttesen1
Occasional Contributor

When I publish Feature Services in AGOL, they get published to https://services.arcgis.com/<orgid>/ArcGIS/rest/services/xxx

This orgid is nice to have and sometimes essential to use in other REST API calls, just as https://www.arcgis.com/sharing/rest/portals/<orgid>/users

Can one generate a token through https://www.arcgis.com/sharing/rest/generateToken and then make a call to retrieve organization information, including the orgid?

Tags (4)
1 Solution

Accepted Solutions
AndresCastillo
MVP Regular Contributor

See my reply to this thread:

https://community.esri.com/thread/79521#comment-341309 

After you get your token using one of the methods described in the developer security and authentication documentation, ArcGIS Security and Authentication | ArcGIS for Developers , you can call into the ....sharing/rest/portals/self endpoint to get the orgId.

View solution in original post

1 Reply
AndresCastillo
MVP Regular Contributor

See my reply to this thread:

https://community.esri.com/thread/79521#comment-341309 

After you get your token using one of the methods described in the developer security and authentication documentation, ArcGIS Security and Authentication | ArcGIS for Developers , you can call into the ....sharing/rest/portals/self endpoint to get the orgId.