Skip to content

Instantly share code, notes, and snippets.

Darren Robinson darrenjrobinson

View GitHub Profile
View Azure Function Table Service Output Binding.ps1
$breweryDBURI = 'https://sandbox-api.brewerydb.com/v2/'
$key = 'myAPIKey'
$stylesURI = "$($breweryDBURI)styles?key=$($key)"
$beerStyles = Invoke-RestMethod -Uri $stylesURI -Method Get
[PSObject []] $outputArray = $null
foreach ($style in $beerStyles.data){
$entity = [PSObject]@{
View Make IdentityNow Identity Attribute Searchable.ps1
$orgName = "yourOrgname"
# Get Identity Attr
$getIdentityAttributesBaseURI = "https://$($orgName).api.identitynow.com/cc/api/identityAttribute/list"
# Get Attr Only
$getIdentityAttrBaseURI = "https://$($orgName).api.identitynow.com/cc/api/identityAttribute/get?name="
# Update URI
$attributeUpdateBaseURI = "https://$($orgName).api.identitynow.com/api/identityAttribute/update?"
$identityAttrs = Invoke-RestMethod -Method Get -Uri $getIdentityAttributesBaseURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"; "content-type" = "application/json"}
@darrenjrobinson
darrenjrobinson / SailPoint IdentityNow AzureAD Source Filter.ps1
Last active Mar 31, 2019
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/
View SailPoint IdentityNow AzureAD Source Filter.ps1
# 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
View Update IdentityNow Identity Profile Priority.ps1
# Your API Client ID
$clientID = 'yourClientID'
# Your API Client Secret
$clientSecret = 'yourClientSecret'
$Bytes = [System.Text.Encoding]::utf8.GetBytes("$($clientID):$($clientSecret)")
$encodedAuth = [Convert]::ToBase64String($Bytes)
# Your IdentityNow Tenant Name
$orgName = 'yourOrgName'
# IdentityNow Admin User and PWD to connect with
$adminUSR = [string]"yourAdminname".ToLower()
View Generate Identity Profiles Report.ps1
# Your API Client ID
$clientID = 'yourClientID'
# Your API Client Secret
$clientSecret = 'yourClientSecret'
$Bytes = [System.Text.Encoding]::utf8.GetBytes("$($clientID):$($clientSecret)")
$encodedAuth = [Convert]::ToBase64String($Bytes)
# Your IdentityNow Tenant Name
$orgName = 'yourOrgName'
# IdentityNow Admin User and PWD to connect with via oAuth
$adminUSR = [string]"yourAdminName".ToLower()
View Aggregate Source without Optimization.ps1
# Your API Client ID
$clientID = 'yourClientID'
# Your API Client Secret
$clientSecret = 'yourSecret'
$Bytes = [System.Text.Encoding]::utf8.GetBytes("$($clientID):$($clientSecret)")
$encodedAuth = [Convert]::ToBase64String($Bytes)
# Your IdentityNow Tenant Name
$orgName = 'yourOrg'
# IdentityNow Admin User and PWD to connect with via oAuth
$adminUSR = [string]"yourAdminAccount".ToLower()
View Create New Access Profile.ps1
$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)
View Get Source Entitlements.ps1
# IdentityNow Orgname
$orgName = "myOrgname"
# Get IdentityNow Sources
$IDNSources = Invoke-RestMethod -Method Get -Uri "https://$($orgName).api.identitynow.com/cc/api/source/list" -Headers @{Authorization = "Basic $($encodedAuth)" ;"content-type" = "application/json"}
write-host -ForegroundColor Green "$($IDNSources.Count) Sources found"
$utime = [int][double]::Parse((Get-Date -UFormat %s))
# Get Source Entitlements
foreach ($idnSource in $IDNSources) {
View IdenityNow Account ID.ps1
# IdentityNow Organisation
$org = "myOrgname"
# Search Identities
$searchBaseURI = "https://$($org).api.identitynow.com/cc/api/user/list?"
$utime = [int][double]::Parse((Get-Date -UFormat %s))
$userSearch = "darren.robinson@customer.com.au"
$userSearchEncoded = [System.Web.HttpUtility]::UrlEncode($userSearch)
View IdentityNow Request Object.json
{
"joinOperator": "OR",
"filter": [
{
"property": "name",
"value": "darren.robinson@customer.com.au"
},
{
"property": "alias",
"value": "darren.robinson@customer.com.au"
You can’t perform that action at this time.