Using the portal API, how can I get a list of all the groups that a user is a member?
Nevermind! Got it:
Feel free to mark this question as answered, even if you provided the answer yourself.
Here's another way with python
from arcgis.gis import GISgis = GIS("https://<your portal URL>/portal", "<your username>","<your password>")oneUser = gis.users.search("<username>")for i in oneUser: print(i.groups)# or you can get multiple users# myUsers = gis.users.search("*")# then list the groups for those users# for i in myUsers :# print(i.username, " ", i.groups)# see https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#user# for other things you can print out for each user# see https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#usermanager# for ways to search and sort users
Hi Pierre Masson,
Another way to do this is to find who has the Portal Admin access, they will be able to go through the Organization
tab choose manage members, find the Individual's name, next to their name is three dots ... , click that and in the drop down choose view groups.
This may be an easier process in future.
Retrieving data ...