ArcGIS Online oAuth2 Permissioning

4489
1
08-25-2015 07:28 AM
deleted-user-RAnWn8DDSd1P
New Contributor III

Using our organization's admin user I created an application to get clientId and clientSecret so I can fetch a token and query our portal.  I'm finding though that the token is no good for querying private groups created and owned by the very same user.  Only items shared public are returned from these URLs.

no private groups returned:

https://pdx.maps.arcgis.com/sharing/rest/community/groups?q=owner%3A<ownerName>&f=json&token=<token>

no item returned:

https://pdx.maps.arcgis.com/sharing/rest/search?q=group%3A<privateGroupId>&f=json&token=<token>

Shouldn't these be returning the private items?  The docs state Application Authentication has the capability of "Read Content Owned by User [1] The “user” is the user who created the application.

https://developers.arcgis.com/authentication/

UPDATE: So it turns out the token is good for this request, but the requests that return any group results do not have private items included

https://pdx.maps.arcgis.com/sharing/rest/content/items/<privateWebMapId>/data?f=json&token=<token>

0 Kudos
1 Reply
simoxu
by MVP Regular Contributor
MVP Regular Contributor

For application authentication, instead of using AGOL account (User logins), you can use application ID to and App secret to get a token to access the content shared with the app developer (with an AGOL account). this is convenient when you are developing an app to users who don't have AGOL accounts.

So I think you have to use the token in your application which AGOL will recognise, because you registered the application.

0 Kudos