cyberark / epv-api-scripts

These API scripts enable CyberArk users to automate privileged account management task like account creation, user management, and more.
https://www.cyberark.com/best
Apache License 2.0
201 stars 176 forks source link

Invalid characters List #180

Closed evanatta closed 3 years ago

evanatta commented 3 years ago

Team,

Is there a list of characters that are known to cause issues. While working with a customer, they had a safe name with an "&" character in the name. This character was successfully on boarded using the SAFE-Management script. However when adding accounts to the safe with the Account-Onboarding script it would through an error and state that the assigned CPM was invalid.

[ERROR] Error Message: {"ErrorCode":"EPVWS101E","ErrorMessage":"Failed to create Safe 'SAFE So&So'. Reason: The specified Managing CPM user doesn't exist"}

AssafMiron commented 3 years ago

Hello @evanatta ,

You can see this note in the REST API documentation of CyberArk saying: The following characters are not supported in URL values: + & % To overcome this and allow creation of such safes, in the Account Onboarding Utility there is a function to convert the Safe Name to a valid URL encoding such characters

In order to try and fix this issue you created, I created a new version that I would like you to test out here: https://github.com/cyberark/epv-api-scripts/blob/DebugWIP/Account%20Onboard%20Utility/Accounts_Onboard_Utility.ps1

You can look at the attached pull request for more details if you like It would be great if you can test this new version and update us so we can commit it to the main branch

Thanks, Assaf