I've run a query against portal to return a list of all users, but the user objects returned don't include the groups that each user belongs to. Any ideas how to get this info?
I've tried running a query against portal to return the groups, but can't get that to work. It always returns undefined... why doesn't normal syntax like 1=1 or '*' work when querying portal?
Solved! Go to Solution.
Andrew,
Once you have the user class from the query you use the getGroups method
https://developers.arcgis.com/javascript/3/jsapi/portaluser-amd.html#getgroups
Andrew,
Once you have the user class from the query you use the getGroups method
https://developers.arcgis.com/javascript/3/jsapi/portaluser-amd.html#getgroups
Thanks Robert!
Since I'm using the 4.x API, i ended up having to use the fetchGroups() method found here: PortalUser | API Reference | ArcGIS API for JavaScript 4.6, but same idea.