Hello,
I am trying to remove an identity from a role using a PATCH call to the /v3/roles/<role_id> Beta API endpoint with the identity ID, and I am having issues. I have tried multiple request bodies unsuccessfully. For example, if I pass the following body:
[
{
"op": "remove",
"path": "/membership/identities",
"value": {
"id": "<identity id>"
}
}
]
It removes the entire list of identities from the role. No matter what I’ve tried putting in the “value” field in the body, it removes the entire identity list with that path. However, if I use the following body:
[
{
"op": "remove",
"path": "/membership/identities/0"
}
]
with /membership/identities/<index>
as the path, it will remove the identity at that index in the list.
Based on this, it seems that the only way to remove an identity from a role would be to first make a GET call to get the list of identities in the role, then find the identity in the list, then remove that identity based on the index. That method seems fairly arduous and would be even more difficult if not impossible to do within a Sailpoint workflow (which is what I am trying to do) given the limitations that exist around loops.
This is a similar problem that apparently hasn’t been solved yet: Add/Remove operations on Beta Patch Roles/Access Profiles endpoints - #5 by Prooxie
Thank you