Public/get-AllegisIDNsourceSchemaExport.ps1

1
2
3
4
5
6
7
8
9
10
11
12
function get-AllegisIDNsourceSchemaExport ($orgName, $sourceid, $accessToken,$usage){
    $header=get-AllegisIDNprivateHeader $accessToken
    $privateuribase="https://$orgname.identitynow.com/api"
    if ($usage -eq $null){
        $url="$privateuribase/api/accountProfile/list/$sourceid"
    }else{
        $url="$privateuribase/api/accountProfile/get/$($sourceid)?usage=$usage"
    }
    $response=Invoke-WebRequest -Uri $url -Method Get -UseBasicParsing -Headers $header
    $sourceAccountProfile=$response.Content | ConvertFrom-Json
    return $sourceAccountProfile
}