<?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 Deleting a Named User - Error 400: COM_0018 User does not exist or is inaccessible in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/deleting-a-named-user-error-400-com-0018-user-does/m-p/1261199#M4388</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm writing a powershell script to delete enterprise named user (SSO via SAML provider) from Portal 10.8.1 using various REST API endpoints (eg. sharing/rest/generateToken,&amp;nbsp;sharing/rest/community/users,&amp;nbsp;sharing/rest/community/users/xxxx/provisionedListings,&amp;nbsp;sharing/rest/community/users/xxxx/delete) and deleting them from AD groups as well.&lt;/P&gt;&lt;P&gt;The script is working in generating a token, find the user, checks the user entitilements (eg. Utility Network extension), remove the entitlement from the user, are they a member of a group, etc.&lt;/P&gt;&lt;P&gt;The part that's failing is trying to remove/delete the user which is where this error is coming from.&lt;/P&gt;&lt;P&gt;The user that generates the token is an Administrator and can delete users via Portal's UI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my section of code that tries to remove the user&lt;/P&gt;&lt;P&gt;$body = @{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; token=$token&lt;BR /&gt;&amp;nbsp; &amp;nbsp; f="json"&lt;BR /&gt;}&lt;BR /&gt;$response = Invoke-WebRequest -Uri "$baseUri/sharing/rest/community/users/$nameuser/delete" -Body $body -Method "POST"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anybody come across this issue before? Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2023 04:58:52 GMT</pubDate>
    <dc:creator>AnthonyRyanEQL</dc:creator>
    <dc:date>2023-02-24T04:58:52Z</dc:date>
    <item>
      <title>Deleting a Named User - Error 400: COM_0018 User does not exist or is inaccessible</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/deleting-a-named-user-error-400-com-0018-user-does/m-p/1261199#M4388</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm writing a powershell script to delete enterprise named user (SSO via SAML provider) from Portal 10.8.1 using various REST API endpoints (eg. sharing/rest/generateToken,&amp;nbsp;sharing/rest/community/users,&amp;nbsp;sharing/rest/community/users/xxxx/provisionedListings,&amp;nbsp;sharing/rest/community/users/xxxx/delete) and deleting them from AD groups as well.&lt;/P&gt;&lt;P&gt;The script is working in generating a token, find the user, checks the user entitilements (eg. Utility Network extension), remove the entitlement from the user, are they a member of a group, etc.&lt;/P&gt;&lt;P&gt;The part that's failing is trying to remove/delete the user which is where this error is coming from.&lt;/P&gt;&lt;P&gt;The user that generates the token is an Administrator and can delete users via Portal's UI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my section of code that tries to remove the user&lt;/P&gt;&lt;P&gt;$body = @{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; token=$token&lt;BR /&gt;&amp;nbsp; &amp;nbsp; f="json"&lt;BR /&gt;}&lt;BR /&gt;$response = Invoke-WebRequest -Uri "$baseUri/sharing/rest/community/users/$nameuser/delete" -Body $body -Method "POST"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anybody come across this issue before? Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 04:58:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/deleting-a-named-user-error-400-com-0018-user-does/m-p/1261199#M4388</guid>
      <dc:creator>AnthonyRyanEQL</dc:creator>
      <dc:date>2023-02-24T04:58:52Z</dc:date>
    </item>
  </channel>
</rss>

