[PrivCloud] How to add AD Group as Safe Member via Rest API

[PrivCloud] How to add AD Group as Safe Member via Rest API

151
Created On 11/10/26 11:01 AM - Last Modified 11/10/26 15:58 PM


Symptom


In Privilege Cloud, when attempting to add the AD group to a safe as safe member, there is error response:


{"ErrorCode":"SFWS0010","ErrorMessage":"Member <username>@lab.local has not been defined."}


After adding the group manually (via UI) then it works.



Environment


14.0 Privilege Cloud Cyber-Ark API/SDK

Cyber-Ark API/SDK REST API

Privilege Cloud



Cause


To add the AD group in Privilege Cloud via the REST API, the value for "searchIn" should be the directory GUID



Resolution


To add the AD group in Privilege Cloud via the REST API, the value for "searchIn" should be the directory GUID, and not the name of the directory "lab.local". The directory GUID can be found by adding a group/user to a safe with developer tools running. Once completed save the action as a HAR file and then search for "SearchIn" in the HAR file to find the directory GUID. Please update the body to use your directory GUID and try again.


See below example body:


{"MemberName":"TestFor@lab.local","MembershipExpirationDate":null,"Permissions":{"listAccounts":true,"useAccounts":true,"retrieveAccounts":true,"addAccounts":false,"updateAccountProperties":false,"updateAccountContent":false,"initiateCPMAccountManagementOperations":false,"renameAccounts":false,"deleteAccounts":false,"unlockAccounts":false,"manageSafe":false,"viewSafeMembers":false,"viewAuditLog":false,"backupSafe":false,"accessWithoutConfirmation":false,"moveAccountsAndFolders":false,"createFolders":false,"deleteFolders":false,"requestsAuthorizationLevel1":false,"requestsAuthorizationLevel2":false},"SearchIn":"sda213213-43d0-46dd-4f52-2dsd2gddf07a","MemberType":"Group"}



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj000000169vCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail