I have a web map that I wish to share with a group in ArcGIS Enterprise. Using the Portal, I can share the map with the group:


However, if I try to share the same map with the same group using the Python API, the map cannot be shared with the group:
cbmt<SPAN class="punctuation token">.</SPAN>share<SPAN class="punctuation token">(</SPAN>org<SPAN class="operator token">=</SPAN><SPAN class="token boolean">True</SPAN><SPAN class="punctuation token">,</SPAN> groups<SPAN class="operator token">=</SPAN>basemaps_group<SPAN class="punctuation token">.</SPAN>title<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">'Basemaps / Cartes de base'</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">'21e8f2ab90904f4ba38e44386f03851c'</SPAN><SPAN class="punctuation token">}</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Note that I am able to successfully share other maps (e.g., Esri basemaps) with this group within the same script.
Why can't I share the map with the group using the Python API?