<?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 Re: Error creating a user with custom role in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/1168343#M7343</link>
    <description>&lt;P&gt;Thanks for this! This will save me a lot of time. As an FYI for others stumbling on this post, I discovered that if you filter your users by the custom role of interest, the ID will show in the URL bar:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JCGuarneri_0-1651069610662.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39951i778B7618FA2B547F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JCGuarneri_0-1651069610662.png" alt="JCGuarneri_0-1651069610662.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2022 14:27:40 GMT</pubDate>
    <dc:creator>JCGuarneri</dc:creator>
    <dc:date>2022-04-27T14:27:40Z</dc:date>
    <item>
      <title>Error creating a user with custom role</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/801244#M2078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get an error when I execute my script to create a user with a custom role. Level 2 is&amp;nbsp;assigned as well to the user but no luck executing the code successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="" style="color: #cccccc; background-color: #1e1e1e; font-weight: normal; padding-left: 20px;"&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;java.lang.Exception: &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;The server at '&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/XXXXXXXXXXXXX.XXXXXXX.com:7443/arcgis/sharing/rest/community/createUser" rel="nofollow" target="_blank"&gt;https://XXXXXXXXXXXXX.XXXXXXX.com:7443/arcgis/sharing/rest/community/createUser&lt;/A&gt;&lt;SPAN&gt;' returned an error. The user account cannot be created as the role assigned to it does not exist. []&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #cccccc; background-color: #1e1e1e; font-weight: normal; padding-left: 20px;"&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;(Error Code: 500)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the custom role exists when I see logging in as an admin through the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I get some help? Thanks.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/45514"&gt;Atma Mani&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Naresh Aligeti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python api portal‌&lt;/P&gt;&lt;P&gt;arcgis-api-python‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 04:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/801244#M2078</guid>
      <dc:creator>NareshAligeti2</dc:creator>
      <dc:date>2018-09-14T04:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error creating a user with custom role</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/801245#M2079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way to investigate this is to list the custom roles using Python, then using that as an input when you create a new user. This avoids typos and aliases if there are any.&lt;/P&gt;&lt;P&gt;You can look up at&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/guide/accessing-and-managing-users/#Listing-all-the-custom-roles-in-an-org" title="https://developers.arcgis.com/python/guide/accessing-and-managing-users/#Listing-all-the-custom-roles-in-an-org"&gt;Accessing and managing users | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;for how to list custom roles.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 16:31:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/801245#M2079</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-09-14T16:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error creating a user with custom role</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/801246#M2080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your prompt reply. I found a fix (probably a bandage fix).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have one custom role called &lt;EM&gt;ViewerPlus&lt;/EM&gt;. When I tried to add the user from backdoor(script) it fails but adding the same user to the same role through front end(UI) works just fine, upon looking at the form data using fiddler trace i found that role is submitted to portal as&amp;nbsp;&lt;EM&gt;daiG7yglgzR6cnLe.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I change the code by assigning the role variable to&lt;EM&gt; &lt;EM&gt;daiG7yglgzR6cnLe&lt;/EM&gt;&lt;/EM&gt;, it works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This is not just happening to a custom role but also a default role that esri provides.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, documentation says "org_admin" but UI form passes it as "account_admin". I use "org_admin" in my code and it works just fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't you think this is a bug?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Naresh Aligeti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 16:56:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/801246#M2080</guid>
      <dc:creator>NareshAligeti2</dc:creator>
      <dc:date>2018-09-14T16:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error creating a user with custom role</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/1168343#M7343</link>
      <description>&lt;P&gt;Thanks for this! This will save me a lot of time. As an FYI for others stumbling on this post, I discovered that if you filter your users by the custom role of interest, the ID will show in the URL bar:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JCGuarneri_0-1651069610662.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39951i778B7618FA2B547F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JCGuarneri_0-1651069610662.png" alt="JCGuarneri_0-1651069610662.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 14:27:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-creating-a-user-with-custom-role/m-p/1168343#M7343</guid>
      <dc:creator>JCGuarneri</dc:creator>
      <dc:date>2022-04-27T14:27:40Z</dc:date>
    </item>
  </channel>
</rss>

