Closed arkayali closed 1 year ago
Hi @arkayali
Information revealing how you are running the command is missing - it can be assumed that your issue lies there as unable to replicate the behaviour you see.
PS > Add-PASAccount -secretType Password -secret $password -address SomeAddress.com -userName SomeUser `
-platformID Some-Test-Platform -SafeName SomeTestSafe `
-platformAccountProperties @{"Port"=123; "LogonDomain"="SomeDomain"}
DEBUG: [Body] {
"remoteMachinesAccess": {
},
"secretManagement": {
},
"platformAccountProperties": {
"LogonDomain": "SomeDomain",
"Port": 123
},
"address": "SomeAddress.com",
"userName": "SomeUser",
"secret": "******",
"secretType": "Password",
"platformID": "Some-Test-Platform",
"SafeName": "SomeTestSafe"
}
VERBOSE: POST with -1-byte payload
VERBOSE: received 434-byte response of content type application/json; charset=utf-8
AccountID : 336_4
Safe : SomeTestSafe
address : SomeAddress.com
userName : SomeUser
name : Operating System-Some-Test-Platform-SomeAddress.com-SomeUser
platformId : Some-Test-Platform
secretType : password
platformAccountProperties : @{LogonDomain=SomeDomain; Port=123}
secretManagement : @{automaticManagementEnabled=True; lastModifiedTime=1660472329}
createdTime : 14/08/2022 10:18:49
categoryModificationTime : 14/08/2022 10:18:49
Can you confirm that you are using the Gen2 API?
Hi @pspete,
Thanks for your reply. Just noticed that I didn't enclose the cmdlet itself .. sorry for that.
This is exactly what I ran .. and I'm using Gen1 API as ver CA 11.5 have issues with Gen2 I guess
Add-PASAccount -SafeName CPM-ReconcileSafe-ER -platformID RedHat-1Time-CVR -address unixvl139 -accountName '' -password $pwd99 -userName unixcsrs -ExtraPass3Name unixcsrs -DynamicProperties @{'LogonDomain'='Server01';'Folder'='Root';'Server_Environment'='UAT';'Class'='FuncID';'AppPlatform'='CyberArk';'Owner'='Milk';'Ticket'='RITM0123456';'DeviceType'='Operating System'} -Debug
Add Accounts Gen 1 API is relevant to legacy versions older than 10.4. Gen 2 API is relevant to versions 10.4 and above. With your 11.5 version, you should use Gen2 API. Support for the legacy API might be removed at some point.
Add-PASAccount -secretType Password -secret $pwd99 -address unixvl139 -userName unixcsrs `
-platformID RedHat-1Time-CVR -SafeName CPM-ReconcileSafe-ER `
-platformAccountProperties @{'LogonDomain'='Server01';'Folder'='Root';'Server_Environment'='UAT'}
@pspete
Thank you so much .. you made my day. I still have some confusion when it comes to Gen1 or Gen2 as other cmdlet don't run unless I add -UseGen1API !! That what made me thing that I should Gen1 for Add-Account
Thanks again
You can see all notes about version requirements here: https://pspas.pspete.dev/docs/compatibility/ All help pages for all module commands should also detail version requirements for specific parameters.
Describe the issue Add-PASAccount returns an error message
To Reproduce
Expected behavior The desired account to be added to CyberArk Screenshots & Console Output
![image](https://user-images.githubusercontent.com/44178884/184552962-1c0f720f-e2b0-425a-9aaa-e57d115279c1.png)
Your Environment
Additional context Add any other context about the problem here.