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 <SPAN class="operator token">=</SPAN> gis<SPAN class="punctuation token">.</SPAN>groups<SPAN class="punctuation token">.</SPAN>get<SPAN class="punctuation token">(</SPAN>olduser<SPAN class="punctuation token">.</SPAN>favGroupId<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">for</SPAN> fav <SPAN class="keyword token">in</SPAN> favs<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>fav<SPAN class="punctuation token">.</SPAN>share<SPAN class="punctuation token">(</SPAN>groups<SPAN class="operator token">=</SPAN>newuser<SPAN class="punctuation token">.</SPAN>favGroupId<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN><SPAN class="comment token"># Full item and group IDs edited out</SPAN>
<SPAN class="punctuation token">{</SPAN><SPAN class="string token">'notSharedWith'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'94..aa'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'itemId'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'b4..34'</SPAN><SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">{</SPAN><SPAN class="string token">'notSharedWith'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'94..aa'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'itemId'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'a5..77'</SPAN><SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">{</SPAN><SPAN class="string token">'notSharedWith'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'94..aa'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'itemId'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'64..35'</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Is there another way to do this?