Update account provisioning polocy error 400

trying to add new attribute on account provisioning on IDN.

PUT https://TenantID/v3/sources/sourceID/provisioning-policies/CREATE

getting this error.

{“detailCode”:“400.0 Bad request syntax”,“trackingId”:“597d89d582c84eb78e7f4d971e29b2cf”,“messages”:[{“locale”:“en-US”,“localeOrigin”:“DEFAULT”,“text”:“The request could not be parsed.”},{“locale”:“und”,“localeOrigin”:“REQUEST”,“text”:“The request could not be parsed.”}],“causes”:}

@nguanizo2 Remove CREATE from your API URL. Your URL should be like this:

POST :

https://{tenant name}.api.identitynow.com/v3/sources/{source id}/provisioning-policies

Change the tenant name and source id above as per your environment.

Also providing sample JSON body below for adding one account attribute below:

{
    "name": "Account",
    "description": "Create Provisioning Policy for ABC application",
    "usageType": "CREATE",
    "fields": [
        {
            "name": "Email",
            "transform": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "email"
                }
            },
            "attributes": {},
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        }
    ]
}

Let me know if this helps.

Thanks,
Arshad.

Hello Arshad,

Would like to clarify. i do have exiting provisioning policy for Active Directory i would like to add new attribute.

using POST will overwrite the existing provisioning policy?

Hi @nguanizo2,

You can make use of the visual studio code extension which is very easy to setup and use. The extension makes it easy for you to create and update policies (and make many other config changes without depending on Postman).

You can copy and paste the values from any existing attribute and just save to make the updates in the cloud.

@nguanizo2 In that case, there is a PUT API call you can use as below:

PUT : https://{tenant name}.api.identitynow.com/v3/sources/ {source id}/provisioning-policies/CREATE

For the JSON body, you can use the same template as above which I’ve provided and it would work. Bad request errors usually error arise if your JSON body is improperly formed.

What I typically do is first do a get on the same URL, so GET https://TenantID/v3/sources/sourceID/provisioning-policies/CREATE

This ensures you have the proper formatting for the PUT. You can test it out by directly doing a PUT using the output of the GET above.

Then add the attribute you want to add and do another PUT.

If that doesn’t work, perhaps you can share the body you’re using?

And I can indeed also recommend the VS Code extension for ICS. It’s for some of these updates a real life (and time!) saver.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.