Patch Role Remove Access Profile

Trying to remove an access profile with https://{tenant}.api.identitynow.com/beta/roles/{id}

[
    {
        "op": "remove",
        "path": "/accessProfiles/-",
        "value": {
            "type": "ACCESS_PROFILE",
            "id": "2c9180847353ddeb01735925f7990cca"
        }
    }
]

Getting The error below. Any thing i’m doing wrong?

{
    "detailCode": "400.1 Bad request content",
    "trackingId": "6fe3261548ea402cb6c296e1519eaec2",
    "messages": [
        {
            "locale": "en-US",
            "localeOrigin": "DEFAULT",
            "text": "The request was syntactically correct but its content is semantically invalid."
        }
    ],
    "causes": []
}

Hey @SailAway ,

I tried this and was successfully able to remove the access profile. I used postman and tried the below process :

  • API Call :

https://{tenant}.api.identitynow.com/beta/roles/{role id}

  • Authorization

Bearer Token

  • Headers
    (Create key and value in ‘Headers’ as below)

Key : Content-Type
Value : application/json-patch+json

  • Body
    (seems like you have a “-” beside “accessProfiles”. Please remove)

[
{
“op”: “remove”,
“path”: “/accessProfiles”,
“value”: {
“type”: “ACCESS_PROFILE”,
“id”: “{access profile id}”
}
}
]

Let me know if this helps?

Thanks.

Regards,
Arshad.

Hello,

Access profile value should be in array. Also I noticed SP removing all Access profiles.

[
{
“path”: “/accessProfiles”,
“op”: “replace”,
“value”: [
{
“id”: “*****”,
“type”: “ACCESS_PROFILE”
}
]
}
]

1 Like