Public/convert-AllegisIDNentitlementNameToID.ps1

1
2
3
4
5
6
7
8
function convert-AllegisIDNentitlementNameToID ($orgName,$entitlementName,$accessToken){
   $header=get-AllegisIDNprivateHeader $accessToken
   $url="https://$orgname.api.identitynow.com/v2/search/entitlements?limit=1&query=entitlements(name:$entitlementName)"
   $response=Invoke-WebRequest -Uri $url -Method Get -Headers $header
   $EntitlementID=$($response.Content | ConvertFrom-Json).id
   return $EntitlementID 
}