I'm using the ArcGIS Python API to report on items owned by users in my ArcGIS Online organization.
For each user I loop through their items and check the shared_with property to see which groups the item is shared with but it's always blank even on items I have manually checked that are shared with groups.
Has anyone run into this problem before?
A snippet from my script is below, the last line is causing the problem.
# connect to organisation etc....
for user in gis.users.search(max_users=9999):
for folder in user.folders:
for item in user.items(folder):
if not item.shared_with["groups"]:
# log item
The result in my watch window in VS code is below.
For additional info, I'm an admin in the organisation and I'm using version 1.7.0 of the python API.
Same problem for me.
I'm admin and items of my users are definitely shared with groups but shared_with["groups"] always return an empty array...
I'm using version 1.8.1 of the python API. (From ArcGIS Pro's Notebook. Pro Version 2.6.1)
Same for me too.
Iterating items from gis.content.search(). shared_with property seems to have correct values for everyone and org properties, but groups is always an empty list, even though the items clearly are shared with groups via the UI
I have recently run into this issue as well - currently using version 1.8.2.
Oddly enough, I have used 'Shared_with' many times before and have never had this issue.
Has anybody had luck in resolving the issue?