Public/remove-AllegisIDNsourceSchemaImportAttribute.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function remove-AllegisIDNsourceSchemaImportAttribute ($orgName, $sourceid, $accessToken, $name){
    "needs troubleshooting"
    break
    $header=get-AllegisIDNprivateHeader $accessToken
    $header+=@{'Content-Type'='application/x-www-form-urlencoded'}
    $header+=@{'charset'='UTF-8'}
    $header+=@{'TE'='Trailers'}
    $header+=@{'Origin'="https://$orgname.identitynow.com"}
    $header+=@{'X-Requested-With'="X-Requested-With: XMLHttpRequest"}
    $privateuribase="https://$orgname.api.identitynow.com"
    $url="$privateuribase/cc/api/source/deleteSchemaAttribute/$sourceid"
    $body="names=$name&objectType=account"
    $response=Invoke-WebRequest -Uri $url -Method Post -UseBasicParsing -Headers $header -Body $body
    $sourceSchema=$response.Content | ConvertFrom-Json
    return $sourceSchema
}