Copying favorites from one user to another

03-28-2019 08:15 AM
New Contributor III

I'm trying to move users from ArcGIS online logins to SSO logins, and one thing I stuck on is favorites.  I can get the list of favorites from the old user using the favGroupId but when I try hen I try to add them to the new user by sharing them to the favGroupId (the way I would with any other group), I just get 'notSharedWith' for all the items.

favs = gis.groups.get(olduser.favGroupId)
for fav in favs.content():
# Full item and group IDs edited out
{'notSharedWith': ['94..aa'], 'itemId': 'b4..34'}
{'notSharedWith': ['94..aa'], 'itemId': 'a5..77'}
{'notSharedWith': ['94..aa'], 'itemId': '64..35'}‍‍‍‍‍‍‍

Is there another way to do this?

Tags (1)
0 Kudos
1 Reply
New Contributor III

It turns out the above code works fine as long as I'm logged in to the gis as the newuser, however that doesn't work for me in this scenario because I can't log in as the target SSO users.

It does not work if I'm just logged in as an admin (which is what I tried above).

I'm still looking for another option.

0 Kudos