Is it possible to get email addresses for all members of a group?

04-10-2019 05:50 PM
New Contributor III

My organization has a Survey123 survey that is shared with a specific group in our ArcGIS Online organization.  There are dozens of people with whom the survey has been shared, but we now need to reach out to them to inform them of a change to the survey.  Not all of the members of the group are members of our ArcGIS Online organization; the group contains members from outside organizations.

From looking at the Python API, we suspect it is possible to get a list of all the group members who are members of the organization, but not the folks who are not in the org.  

Is it possible to get a list (including email contact information) for group members who are both inside and outside of our ArcGIS Online organization?

Thank you, 

0 Kudos
2 Replies
MVP Regular Contributor

Hi Lindsay,

I think you are right in stating that it is not possible to retrieve the email addresses of members of a group who are not member of your organisation.

Recently I wrote a script to get an overview of group membership in an AGOL organization, but I had to jump over all group members outside the organization to avoid the error message 

"You do not have permissions to access this resource or perform this operation."


See the link below for the script (which does not solve your issue): 

Curious what the solution would be.


0 Kudos
Occasional Contributor

Would be great if Esri allowed/fixed this. We have the same, a group with a mix of internal and external users (invited to the group) and we need to send comms/update notifications.

If anything it appears the API might have gotten worse as I don't get the error @EvaHeggem got when I try to retrieve the email for a member outside of our organisation. Instead I get the following with v1.8.1 of the API, when I hit a user who is outside our organisation:


Traceback (most recent call last):
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\", line 6668, in __getattr__
    return dict.__getitem__(self, name)
KeyError: 'email'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\OneDrive\Python\", line 71, in <module>
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\", line 6670, in __getattr__
    raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, name))
AttributeError: 'User' object has no attribute 'email'



0 Kudos