V3 patch-access-profile API returning 500 on accessRequestConfig PATCH requests

Hi, I am trying to set the access request config to Access Profile Owner but all of my PATCH requests have returned a 500.0 Internal fault error.

The documentation (patch-access-profile | SailPoint Developer Community) doesn’t show the syntax for the /accessRequestConfig path, so I did a get request on an AP that already has this config applied to see the format, this is what it looks like:

    "accessRequestConfig": {
      "commentsRequired": false,
      "denialCommentsRequired": false,
      "approvalSchemes": [
        {
          "approverType": "OWNER",
          "approverId": null
        }
      ]
    },

So I tried a PATCH request with the following body, but I’m still getting the 500. I tried variations e.g. add as the operation, ACCESS_PROFILE_OWNER instead of OWNER, but I’m getting a 500 on all of these REQUESTS.
When I try a PUT request with this body I get a 400.1 Bad request content, not sure if this relevant but including just in case.

Can anyone see what’s wrong with my request body?

   {
      "op": "replace",
      "path": "/accessRequestConfig",
      "value": {
        "approvalSchemes": [
          {
            "approverType": "OWNER",
            "approverId": null
          }
        ]
      }
    }

What you likely want is to do something like this:

   {
      "op": "replace",
      "path": "/accessRequestConfig/approvalSchemes",
      "value":  [
          {
            "approverType": "OWNER",
            "approverId": null
          }
        ]
    }

You may be able to find more help on the Patch command here: Patch Requests | SailPoint Developer Community

Additionally, make sure wit hthe PATCH command that you change the “ContentType” in the Headers to the correct one. I think most PATCH references in the Postman collection default to the wrong one.

Hi @lead1,

You need to change the content type to application/json-patch+json this is why you are receiving the 500 error.

There is nothing wrong with your request body:

[
    {
        "op": "replace",
        "path": "/accessRequestConfig",
        "value": {
            "approvalSchemes": [
                {
                    "approverType": "OWNER",
                    "approverId": null
                }
            ]
        }
    }
]

Thanks,
Dan

1 Like

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