<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to get information on which SAML group is used in a portal group? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1137799#M7048</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to move groups from one enterprise portal to another. The groups are getting their members from SAML groups and I want to use the same SAML group on the target portal.&lt;/P&gt;&lt;P&gt;But I can't find any method in the API that returns which SAML group is used in the source group . I can get a list of users with group.get_members() or group.user_list() but not the SAML group.&lt;/P&gt;&lt;P&gt;I couldn't find anything in the REST API either.&lt;/P&gt;&lt;P&gt;The information is there, as you can edit it on the settings tab on the group.&lt;/P&gt;&lt;P&gt;Am I overlooking something obvious?&lt;/P&gt;&lt;P&gt;I'm using Enterprise 10.9.1 and ArcGIS API for Python 1.9.1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt; I found two properties for groups,&amp;nbsp; provider and providerGroupName. If the group uses SAML , provider is set to 'enterprise', but providerGroupName is still None.&lt;/P&gt;&lt;P&gt;Also the&amp;nbsp;isInvitationOnly property is False for groups using SAML&lt;/P&gt;&lt;P&gt;So at least now I can check whether SAML is used and give a warning that information should be updated manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 11:22:58 GMT</pubDate>
    <dc:creator>CarstenB_orsted</dc:creator>
    <dc:date>2022-01-27T11:22:58Z</dc:date>
    <item>
      <title>How to get information on which SAML group is used in a portal group?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1137799#M7048</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to move groups from one enterprise portal to another. The groups are getting their members from SAML groups and I want to use the same SAML group on the target portal.&lt;/P&gt;&lt;P&gt;But I can't find any method in the API that returns which SAML group is used in the source group . I can get a list of users with group.get_members() or group.user_list() but not the SAML group.&lt;/P&gt;&lt;P&gt;I couldn't find anything in the REST API either.&lt;/P&gt;&lt;P&gt;The information is there, as you can edit it on the settings tab on the group.&lt;/P&gt;&lt;P&gt;Am I overlooking something obvious?&lt;/P&gt;&lt;P&gt;I'm using Enterprise 10.9.1 and ArcGIS API for Python 1.9.1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt; I found two properties for groups,&amp;nbsp; provider and providerGroupName. If the group uses SAML , provider is set to 'enterprise', but providerGroupName is still None.&lt;/P&gt;&lt;P&gt;Also the&amp;nbsp;isInvitationOnly property is False for groups using SAML&lt;/P&gt;&lt;P&gt;So at least now I can check whether SAML is used and give a warning that information should be updated manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 11:22:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1137799#M7048</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2022-01-27T11:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get information on which SAML group is used in a portal group?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1138016#M7050</link>
      <description>&lt;P&gt;that is correct. providerGroupName returns None.&lt;/P&gt;&lt;P&gt;another way to get the providerGroupName using SAML is:&lt;/P&gt;&lt;P&gt;- get the group id using &lt;EM&gt;groupid&lt;/EM&gt; properties&lt;/P&gt;&lt;P&gt;- build this url:&amp;nbsp;group_url = f"&lt;A href="https://portal_url/webadaptor/sharing/rest/community/groups/{group_id" target="_blank" rel="noopener"&gt;https://portal_url/webadaptor/sharing/rest/community/groups/{group_id&lt;/A&gt;}"&lt;/P&gt;&lt;P&gt;- using &lt;STRONG&gt;&lt;EM&gt;urllib&lt;/EM&gt;&lt;/STRONG&gt; find the ProviderGroupName tag value from response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzinSharaf_0-1643310425282.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/32482iD519899DFDE98BFA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzinSharaf_0-1643310425282.png" alt="AzinSharaf_0-1643310425282.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 19:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1138016#M7050</guid>
      <dc:creator>AzinSharaf</dc:creator>
      <dc:date>2022-01-27T19:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get information on which SAML group is used in a portal group?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1138136#M7051</link>
      <description>&lt;P&gt;Hi Azin,&lt;/P&gt;&lt;P&gt;Thanks, I'll try it out as soon as possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW: I just asked Esri support why the providerGroupName is None. I'll post updates here.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE:&amp;nbsp;&lt;/STRONG&gt;I couldn't wait trying it, even though it is late evening here. I get the information I need with the solution provided. Thanks again!&lt;/P&gt;&lt;P&gt;However, I think the information should be available through the ArcGIS API for Python!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 21:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1138136#M7051</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2022-01-27T21:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get information on which SAML group is used in a portal group?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1138164#M7052</link>
      <description>&lt;P&gt;Here's a couple of code snippets if anyone should need it.&lt;/P&gt;&lt;P&gt;Using the f=json parameter returns the response as json, making it very easy to parse.&lt;/P&gt;&lt;P&gt;First using the requests module&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import requests

url =https://myserver.com/portal/sharing/rest/community/groups/{group_id}?f=pjson"

r = requests.get(url)
rjson = r.json()

provider = rjson["provider"]
providerGroupName = rjson["providerGroupName"]

print(provider)
print(providerGroupName)&lt;/LI-CODE&gt;&lt;P&gt;And the the same thing, using urllib&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from urllib.request import urlopen
import json

url = "https://myserver/portal/sharing/rest/community/groups/{group_id}?f=pjson"

r = urlopen(url)
rjson = json.loads(r.read())

provider = rjson["provider"]
providerGroupName = rjson["providerGroupName"]

print(provider)
print(providerGroupName)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 22:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1138164#M7052</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2022-01-27T22:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get information on which SAML group is used in a portal group?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1310289#M8883</link>
      <description>&lt;P&gt;According to &lt;A href="https://github.com/Esri/arcgis-python-api/issues/1279" target="_self"&gt;this thread&lt;/A&gt; this is a confirmed bug, but that page does provide a workaround for getting the group name via the python API:&lt;/P&gt;&lt;PRE&gt;from arcgis.gis import GIS

portal_url = "https://myorgportal.company.com/portal"
portal_username = "admin"
portal_password = "foo"

ent_gis = GIS(portal_url, portal_username, portal_password, verify_cert=False)
editing_groups = ent_gis.groups.search(query="tags:Edition",sort_field="title",sort_order="asc",outside_org=False)
for editing_group in editing_groups:
    edit_group = ent_gis.groups.get(editing_group["id"])
    print(edit_group.providerGroupName)&lt;/PRE&gt;&lt;P&gt;I confirmed that this works with ArcGIS Enterprise 10.9.1.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 00:07:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-get-information-on-which-saml-group-is-used/m-p/1310289#M8883</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2023-07-21T00:07:21Z</dc:date>
    </item>
  </channel>
</rss>

