pspete / psPAS

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

Implement LinkAccount API Method #334

Closed NathanielMaier closed 3 years ago

NathanielMaier commented 3 years ago

Is your feature request related to a problem? Please describe. @infamousjoeg shared a new Postman doc for a LinkAccount API method. I'd love to see this added to psPAS so I can use that to link ExtraPass 1/2/3 accounts at the object level.

Describe the solution you'd like Having an Add-PASAccountLink method or something similar would be great. Being able to pipe in an account ID, along with either specifying an -ExtraPassID parameter or Logon, Reconcile, etc. would help too to keep this more generic.

I'm not sure if my git or dev skills are at a point I could provide a PR for this myself, but I'd be happy to review code and test it in my environment.

Describe alternatives you've considered Before this is implemented, I've had to either specify linked accounts at the Platform level or use the workaround of defining the ExtraPass parameters as Platform properties, neither of which are ideal.

Additional context I'm not fully sure which PVWA version allows this LinkAccount method, but @infamousjoeg said it will be officially supported in v12.1 and available in more recent versions.

infamousjoeg commented 3 years ago

Additional context I'm not fully sure which PVWA version allows this LinkAccount method, but @infamousjoeg said it will be officially supported in v12.1 and available in more recent versions.

Yes, confirmed available in v12.1 GA documentation. However, this could work as far back as v11.8 (we introduce API endpoints prior to GA for testing) and would just need testing to confirm the actual minimum version.

pspete commented 3 years ago

Just like @infamousjoeg said it would be: Now officially documented/released with CyberArk 12.1: https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/WebServices/Link-account.htm?tocpath=Developer%7CREST%20APIs%7CAccounts%7CLinked%20accounts%7C_____1

This will make it into the next module release

infamousjoeg commented 3 years ago

I don't lie lol

pspete commented 3 years ago

I don't lie lol

Never known you to be wrong mate. Edited my previous comment to emphasise that you speak truth 😉

pspete commented 3 years ago

See: https://pspas.pspete.dev/commands/Set-PASLinkedAccount