pspete / psPAS

PowerShell module for CyberArk Privileged Access Security REST API
https://pspas.pspete.dev
MIT License
286 stars 90 forks source link

Unable able to use Add-PASSafeMember #540

Closed LostPoE closed 1 month ago

LostPoE commented 1 month ago

Describe the issue A concise summary of the issue I'm able to query safes, users, and accounts. The safe has appropriate permissions since its the account that created the safe is trying to add a member. (Also double checked in web gui) Been messing with the command for a while. Just want to make sure that Add-PASSafeMember still works.

To Reproduce Steps to reproduce the behavior:

  1. Add-PASSafeMember -SafeName "stagingTestSafe" -MemberName "testuser" -SearchIn "xytras.com" -UseAccounts $true -RetrieveAccounts $true -ListAccounts $true

Expected behavior A clear and concise description of what you expected to happen. Add member to safe with permissions in command.

Screenshots & Console Output If applicable, add screenshots and/or console output to help explain your problem. image


<--Console Output Goes Here-->
Invoke-PASRestMethod: 
Line |
 292 |  …     $result = Invoke-PASRestMethod -Uri $URI -Method POST -Body $Body
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | There are some invalid parameters

Your Environment Include relevant details about your environment CyberArk Cloud services only. No On-prem is being used.

pspete commented 1 month ago

Think you are just missing the membertype parameter which is required for this operation against Privilege Cloud

LostPoE commented 1 month ago

Works. Thanks @pspete !!