Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Create a SailPoint IdentityNow Access Profile via API with PowerShell. Associated Blog Post
$orgName = "myOrg"
$sourceID = "39012"
$profileOwnerID = "12345"
# Access Profile Details
$accessProfile = @{}
$accessProfile.add("name", "My new Access Profile")
$accessProfile.add("description", "The New AP")
$accessProfile.add("sourceId", $sourceID)
$accessProfile.add("ownerId", $ownerID)
# Access Profile Entitlements
$entitlements = @()
$entitlements += "2c91808368c413841268c833031e2477"
$entitlementsToAdd = @{"entitlements" = $entitlements}
$accessProfile.add("entitlements", $entitlementsToAdd.entitlements)
# Access Profile Type
$accessProfile.add("approvalSchemes", "manager")
$accessProfile.add("requestCommentsRequired", $true)
$accessProfile.add("deniedCommentsRequired", $true)
$accessProfileBody = $accessProfile | convertto-json
# Create Access Profile
$newAccessProfile = Invoke-RestMethod -Uri "https://$($orgname)" -Method Post -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"; "Content-Type" = "application/json"} -Body $accessProfileBody
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.