Add Active Directory Security Group ​
POST /userapi/securitygroup
The PowerShell example below creates a Security Group record with various fields specified.
Powershell
#JSON data for the object
$Body = @{
SecurityGroupName = "Core Distribution"
ADDomainNetBIOS = "DomainA"
Description = "Added via the API"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/userapi'
$result = Invoke-Restmethod -Method Post -Uri $PasswordstateURL'/securitygroup' -ContentType "application/json" -Body $jsonData -Header @{ "UserID" = "<UserID>" ; "APIKey" = "<APIKey>" }
Write-Output $result