I am using a script to recursivly unshare all items in an AGOL users content and I am using item.share(False, False, None, False). However after it runs the sharing on the item remains shared everyone true. Any ideas? It seems to be having trouble with items shared everyone.
Solved! Go to Solution.
Figured it out. You have to use the item.unshare() method, which requires a list of groups for the item to be unshared with.
Anybody? This has to be a bug. Unless I am missing something huge.
I also have this question. I am trying to unshare an item so that is completely private. I have tried using the following to no avail:
item.share(everyone=False, org=False, groups=None, allow_members_to_edit=False)
item.share(everyone=False, org=False, groups=[], allow_members_to_edit=False)
item.share(everyone=False, org=False, groups=None, allow_members_to_edit=True)
item.share()
item.share(False)
None of these affected what groups the item is shared with.
Figured it out. You have to use the item.unshare() method, which requires a list of groups for the item to be unshared with.