Select to view content in your preferred language

How to find if user is a partnered organization user?

06-19-2021 06:46 AM
Esri Contributor


We have set-up a partner collaboration in our AGOL subscription. I have a requirement to report items owned by user(s) from a partnered organization(s). I am using ArcGIS API for Python and wrote a simple code with logic to list all users that are from a partnered org and then report items owned by those users. I can go through all users but the user's details doesn't tell me if the user is from a partnered organization or a native user? Is there a property for a "user" object that denotes the user is from a partnered organization? If this is not yet added to ArcGIS API for Python, is there a plan to? when?




2 Replies
MVP Frequent Contributor

So I don't believe those users would show up in a standard search of your AGOL members e.g.

But would show up in the group membership of the collaborated groups.

So possibly a standard search of all your members, then a comparison of the members within each group.  Members in the groups but not in your standard user search would then likely be collaboration members.

Without comparing the lists of all users to those in the groups, you could possibly look at the difference in the lengths of the dir() of each user object or somewhat more explicitly try to access a property normally exposed in a user object from your org, which may not exist (you can't see) in the user object from the partner org such as user.orgId (in a try except as it will error otherwise).


Esri Contributor

Thanks for your reply @DavidPike

I do observe that users from partnered organisation do not have "orgId" property. However, I am reluctant to base the script logic on it unless it is officially documented that way.

The script I am developing is to report on items that are shared by partnered organizations with a large national agency's AGOL site. The partnered organization users will share the items with QA group(s). The script / notebook will inspect shared item's metadata, check completeness score and report to the owner accordingly if inadequate score. If it meets required metadata standards, promote the item from "QA" group to "PROD" group. And I am finding lot of scripting challenges to meet this simple user story, mainly due to lack of API . For one, AGOL doesn't support webhooks for near real-time feedback when item is shared by a partnered user. So writing a script to sweep through all items in group with specific pattern such as "QA" in the group name, find if items are owned by users from partner org (hence this thread), and then inspect metadata. I also find I cannot promote the item to different group programmatically even though the script runs as AGOL admin user.  



0 Kudos