Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenjrobinson/0261ccdeddee06d199b13c4b66468752 to your computer and use it in GitHub Desktop.
Save darrenjrobinson/0261ccdeddee06d199b13c4b66468752 to your computer and use it in GitHub Desktop.
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