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
197 stars 176 forks source link

"Missing Mandatory parameter: [Description]." #290

Closed SuperSchramm closed 10 months ago

SuperSchramm commented 2 years ago

Summary

When I attempt to create an account using the Account_Onboard_Utility.ps1 I am receiving an error stating that:

Error Message: {"ErrorCode":"PASWS017E","ErrorMessage":"Missing Mandatory parameter: [Description]."}

Steps to Reproduce

  1. Fill out the csv file according to the parameters defined within (sample_accounts.csv)
  2. Run the command: .\Accounts_Onboard_Utility.ps1 -PVWAURL "https://myPVWA.myDomain.com/PasswordVault" -CsvPath .\accounts.csv -Create
  3. See Error

Getting PVWA Credentials to start Onboarding Accounts

Safe HHSWindows[SafeOmitted] exists Error Message: {"ErrorCode":"PASWS017E","ErrorMessage":"Missing Mandatory parameter: [Description]."} Exception Message: The remote server returned an error: (400) Bad Request. Status Code: 400 Status Description: Bad Request Logoff Session...

Vaulted 0 out of 1 accounts successfully.

LogoffUrl

Expected Results

The account and/or safe are created successfully

Actual Results

error

Reproducible

Version/Tag number

*Running version 2.2.2 of the script Version 12.6 of CyberArk

sample_accounts.csv

Environment setup

jschristie commented 1 year ago

@AssafMiron I happen to have this same exact issue in the latest (legacy 2). could someone please assist?

jschristie commented 1 year ago

Hi Team, Finally was able to resolve the safe creation without the above mentioned errors. Had to replace " with ' in the lines 133 to 139. modified as below:

URL Methods

-----------

$URL_Safes = $URL_PVWAAPI + '/Safes' $URL_SafeDetails = $URL_Safes + '/{0}' $URL_SafeMembers = $URL_SafeDetails + '/Members' $URL_Accounts = $URL_PVWAAPI + '/Accounts' $URL_AccountsDetails = $URL_Accounts +'/{0}' $URL_AccountsPassword = $URL_AccountsDetails + '/Password/Update' $URL_PlatformDetails = $URL_PVWAAPI +'/Platforms/{0}'

but now, what i see a different error: Error Message: {"ErrorCode":"CASVL005E","ErrorMessage":"Missing object name."} [2022-10-28 01:28:14] [ERROR] Exception Message: The remote server returned an error: (400) Bad Request. [2022-10-28 01:28:14] [ERROR] Status Code: 400:

And also I see that all the permission of the user is copied while using templatesafe. lets i have Administrator in template with all the access, when this is copied, i get to have few basic options. image

Little bit of help would be so helpful to have this up and running in our environment,a s we have 100 users to onboard and regular onboarding too.