Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SailPoint IdentityNow AzureAD Source Filters - Cloud Only Accounts, Guest (B2B) Accounts, Hybrid (AD & AAD) Accounts. Associated post https://blog.darrenjrobinson.com/building-sailpoint-identitynow-azure-ad-source-filters/
# IdentityNow Organisation Name
$orgName = "CompanyName"
# AAD GUESTS (B2B)
$AADSourceUserFilters = @{}
$AADSourceUserFilters.Add("connector_userFilters", "userType eq 'guest'")
$AADSourceUpdateURI = "https://$($orgName).api.identitynow.com/cc/api/source/update/SOURCENumber"
$updateSource = Invoke-RestMethod -Method Post -Uri $AADSourceUpdateURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"} -Body $AADSourceUserFilters
$updateSource
# AAD Hybrid
$AADSourceUserFilters = @{}
$AADSourceUserFilters.Add("connector_userFilters", "dirSyncEnabled eq true and userType eq 'member'")
$AADSourceUpdateURI = "https://$($orgName).api.identitynow.com/cc/api/source/update/SOURCENumber"
$updateSource = Invoke-RestMethod -Method Post -Uri $AADSourceUpdateURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"} -Body $AADSourceUserFilters
$updateSource
# AAD Cloud Only
$AADSourceUserFilters = @{}
$AADSourceUserFilters.Add("connector_userFilters", "dirSyncEnabled eq false and userType eq 'member'")
$AADSourceUpdateURI = "https://$($orgName).api.identitynow.com/cc/api/source/update/SOURCENumber"
$updateSource = Invoke-RestMethod -Method Post -Uri $AADSourceUpdateURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"} -Body $AADSourceUserFilters
$updateSource
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.