Public/set-AllegisIDNIdentityProfile.ps1
function set-AllegisIDNIdentityProfile ($orgname,$profileid,$accesstoken,$jsoninput) { $opening = "{""id"":""$profileid"",""attributeConfig"":{""attributeTransforms"":$($jsoninput)}}" try { $results=Invoke-WebRequest -uri "https://$orgname.api.identitynow.com/cc/api/profile/update/$profileid" -Method post -UseBasicParsing -Headers (get-AllegisIDNprivateHeader -accessToken $accesstoken) -ContentType "application/json" -Body $opening return ($results.content | ConvertFrom-Json) } catch { Write-error $_.exception.message return $_ } } |