1.1.6/Public/set-AllegisIDNIdentityProfile.ps1

function set-AllegisIDNIdentityProfile ($orgname,$profileid,$accesstoken,$attributeTransforms)
{
    if (($attributeTransforms | gm).TypeName[0] -eq 'System.Management.Automation.PSCustomObject'){$jsoninput=$attributeTransforms | ConvertTo-Json -Depth 100}else{$jsoninput=$attributeTransforms}
    $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 $_
    } 
}