- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
03-05-2020 06:47 AM
Hi,
i would like to onboard AWS access key and secret using RESTAPI script below is the piece of code and the required detail i adding the same code into my script but getting error "Cannot add account; reason: Missing mandatory parameter in Platform AWS_AccessKey_Test. (parameter: AWSAccessKeyID)"
Note - " AWS_AccessKey_Test" is created as platform in PVWA.
i think the url which i am using for account addition is something wrong please suggest
## STEP THROUGH EACH CSV ROW
foreach ($row in $csvRows) {
# DEFINE VARIABLES FOR EACH VALUE - MANDATORY FIELDS
$mandatoryArray = 'Password_name','Safe','Folder','Password','DeviceType','PolicyID','Address','UserName','AWSAccessKeyID','AWSAccountID'
$objectName = $row.Password_name.trim()
$safe = $row.Safe.trim()
$safeFolder = $row.Folder.trim()
$password = $row.Password.trim()
$DeviceType = $row.DeviceType.trim()
$platformID = $row.PolicyID.trim()
$address = $row.Address.trim()
$username = $row.UserName.trim()
$AWSAccessKeyID = $row.AWSAccessKeyID.trim()
$AWSAccountID = $row.AWSAccountID.trim()
#**Logging Open row for Account
$XMLResult = $xmlFile.CreateNode("element","Result",$null)
$actName = $xmlFile.CreateElement("AccountName")
$actName.InnerText = $ObjectName
$XMLResult.AppendChild($actName) | Out-Null
#Declaration
$webServiceAddAccount = "https://PVWAURL/PasswordVault/WebServices/PIMServices.svc/Account"
#Authorization
$headerParams = @{}
$headerParams.Add("Authorization",$sessionID)
$newAccounts = @{}
$newAccount = @{}
$newAccount.accountName = $ObjectName;
$newAccount.safe = $Safe
$newAccount.password = $Password
$newAccount.platformID = $PlatformID
$newAccount.username = $username
$newAccount.address = $address
$newAccount.AWSAccessKeyID = $AWSAccessKeyID
$newAccount.AWSAccountID = $AWSAccountID
$properties = @{}
03-09-2020 03:47 AM
Done, i find out the solution myself and its working fine.
03-09-2020 02:03 PM
Can you share that here?
03-11-2020 01:09 AM
i used the same github account onboarding utility script and at the time of runing the script i used command
.\Accounts_Onboard_Utility.ps1 -PVWAURL "https://Hostname/PasswordVault" -CsvPath .\accounts.csv -Create
and the parameter i used for onboard
Parameters for AWS accesskey onboarding :-
safe platformID address username DeviceType password AWSAccessKeyID AWSAccountID disableAutoMgmt disableAutoMgmtReason
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

