<?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: Add safe Member, Permissions value is invalid in PAM Self-Hosted Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299564#M3169</link>
    <description>&lt;P&gt;Try to specify the permissions value als &lt;I&gt;True&lt;/I&gt; (capital T) instead of &lt;I&gt;true&lt;/I&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jan 2019 17:29:08 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2019-01-09T17:29:08Z</dc:date>
    <item>
      <title>Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299563#M3168</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I can't get adding a safe member to work correctly:&lt;/P&gt;&lt;CODE&gt;Invoke-RestMethod -Uri "https://XXXXXXXXX/PasswordVault/WebServices/PIMServices.svc/Safes/$IA_safename/Members" -Method Post -Body $addVaultAdmins -Headers $Headers -ContentType 'application/json'&lt;/CODE&gt;&lt;P&gt;is fed with this json:&lt;/P&gt;&lt;CODE&gt;{
    "member":  {
                   "MemberName":  "Vault Admins",
                   "SearchIn":  "Vault",
                   "MembershipExpirationDate":  "",
                   "Permissions":  [
                                       {
                                           "Key":  "UseAccounts",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "RetrieveAccounts",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "ListAccounts",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "AddAccounts",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "UpdateAccountContent",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "UpdateAccountProperties",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "InitiateCPMAccountManagementOperations",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "SpecifyNextAccountContent",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "RenameAccounts",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "DeleteAccounts",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "UnlockAccounts",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "ManageSafe",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "ManageSafeMembers",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "BackupSafe",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "ViewAuditLog",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "ViewSafeMembers",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "RequestAuthorizationLevel",
                                           "Value":  2
                                       },
                                       {
                                           "Key":  "AccessWithoutConfirmation",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "CreateFolders",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "DeleteFolders",
                                           "Value":  true
                                       },
                                       {
                                           "Key":  "MoveAccountsAndFolders",
                                           "Value":  true
                                       }
                                   ]
               }
}&lt;/CODE&gt;&lt;P&gt;This results in this error:&lt;/P&gt;&lt;CODE&gt;Invoke-RestMethod : {"ErrorCode":"CAWS00001E","ErrorMessage":"Failed to add User or Group Vault Admins. Reason: Input parameter for [Permissions] value is invalid."}
At file.ps1:169 char:20
+ ... DB_reply =  Invoke-RestMethod -Uri "https://xxxxxx/PasswordVault/WebServ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand&lt;/CODE&gt;&lt;P&gt;Does anyone spot the mistake that leads to "Reason: Input parameter for [Permissions] value is invalid."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Mat&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:16:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299563#M3168</guid>
      <dc:creator>mengl</dc:creator>
      <dc:date>2019-01-09T17:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299564#M3169</link>
      <description>&lt;P&gt;Try to specify the permissions value als &lt;I&gt;True&lt;/I&gt; (capital T) instead of &lt;I&gt;true&lt;/I&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:29:08 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299564#M3169</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-01-09T17:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299565#M3170</link>
      <description>&lt;P&gt;The body looks good. I had no issues while testing it with postman. But, i see that you're doing via PS, did you try giving the {"Key":"IPAddress", "Value": "ip"}&amp;nbsp;? It works sometimes.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 19:11:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299565#M3170</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-01-09T19:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299566#M3171</link>
      <description>&lt;P&gt;Another thought: When you manually log in to the PVWA with the user that you use in your PS script, can you add the same permissions there? Remember... you cannot assign permissions on a safe that you yourself don't have on that safe.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 23:47:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299566#M3171</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-01-09T23:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299567#M3172</link>
      <description>&lt;P&gt;​Just tried that, didn't work unfortunately....&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 08:34:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299567#M3172</guid>
      <dc:creator>mengl</dc:creator>
      <dc:date>2019-01-10T08:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299568#M3173</link>
      <description>&lt;P&gt;​You mean by not breaking the line after the key definition? I use $var{ _json_data_} | ConvertTo-Json -Depth 3 and it automatically results in that format. I also tried using -Compress, same result.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 08:36:40 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299568#M3173</guid>
      <dc:creator>mengl</dc:creator>
      <dc:date>2019-01-10T08:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299569#M3174</link>
      <description>&lt;P&gt;​It is a newly created safe from the same user I use to add this user group. All permission ticks are set, manually it just works fine.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 08:38:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299569#M3174</guid>
      <dc:creator>mengl</dc:creator>
      <dc:date>2019-01-10T08:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299570#M3175</link>
      <description>&lt;P&gt;Is there a good log to analyze for API errors?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 17:02:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299570#M3175</guid>
      <dc:creator>mengl</dc:creator>
      <dc:date>2019-01-10T17:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299571#M3176</link>
      <description>&lt;P&gt;There are only the standard PVWA &amp;amp; IIS logs.&lt;/P&gt;&lt;P&gt;I think I remember experiencing this issue when developing the psPAS module, but do not recall the specific resolution.&lt;/P&gt;&lt;P&gt;You could try to break the request down into smaller chunks to try and isolate which part of the JSON is causing issues - i.e. can all of the permissions be set individually? in groups of 2, 3, 4 etc - it might help you find the permission the API is complaining about.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 19:16:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299571#M3176</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-01-10T19:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add safe Member, Permissions value is invalid</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299572#M3177</link>
      <description>&lt;P&gt;solved by by your approach, typo here:&lt;/P&gt;&lt;P&gt;changed&lt;/P&gt;&lt;CODE&gt; {
                                           "Key":  "RequestAuthorizationLevel",
                                           "Value":  2
                                       },&lt;/CODE&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt; {
                                           "Key":  "RequestsAuthorizationLevel",
                                           "Value":  2
                                       },&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 13:59:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/add-safe-member-permissions-value-is-invalid/m-p/1299572#M3177</guid>
      <dc:creator>mengl</dc:creator>
      <dc:date>2019-01-11T13:59:57Z</dc:date>
    </item>
  </channel>
</rss>

