Hi,
I am getting an error while removing a particular user from groups. Below is the request :
curl --location --request DELETE 'https://sailpointbhushan.atlassian.net/rest/api/2/group/user?groupname=confluence-users&accountId=557058:267ee889-f321-4a38-b550-3b7cf22c3e67' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--header 'Authorization: Basic cmFrc2hhbmRhLmJoYXRAc2FpbHB50LmNvbTpVNHVKZmlncnpTZHVsRUlpcWkRBRjE=' \--header 'Cookie: atlassian.xsrf.token=dd38e785-f9bc-42c1-8c37-f7c91683e454_ab0c3eb1d9ae3a1daee40e59bf478d847789c94a_lin'
Response :
{ "errorMessages": [ "An error occurred: com.atlassian.idp.client.exceptions.UserNotFoundException: {\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:Error\"],\"status\":\"404\",\"detail\":\"A user with removed1439043515 doesn't exists\",\"errorType\":\"UserDoesNotExist\",\"message\":\"A user with removed1439043515 doesn't exists\",\"data\":\"removed1439043515\"}" ], "errors": {}}
The users exists but still I am getting above mentioned error "UserNotFoundException". Same request works for other users. Below is the request and response for other user :
Request :
curl --location --request DELETE 'https://sailpointbhushan.atlassian.net/rest/api/2/group/user?groupname=confluence-users&accountId=5c46d52dd8bbb7445c0a0e99' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--header 'Authorization: Basic cmFrc2hhbmRhLmJoAc2FpbHBvaW50LmNvbTpVNHVKlncnpTZHVsRUlpcHdyWkRBRjE=' \--header 'Cookie: atlassian.xsrf.token=dd38e785-f9bc-42c1-8c37-f7c91683e454_ab0c3eb1d9ae3a1daee40e59bf478d847789c94a_lin'
Response :
200OK
Can you please let me know why am I getting "UserNotFoundException" for a particular user while removing that user from a group? Is there any issue with the instance for this user?
Thanks ,
Rakshanda Bhat
Hello @rakshanda_bhat
Welcome to the Atlassian Community!
By the description of the error, I believe you're facing the bug below where a previously removed user cannot be removed from a group by the API DELETE /rest/api/3/group/user:
Previously removed users cannot be handled by using the Users/Groups APIs
This bug happens because there are still records of content association after a user is removed, so when the account is "reactivated" in the backend, it is reassociated with the content as well.
Can you please check if the user that reproduces the issue was previously removed from your site?
If that's the case, please vote and watch the bug to increase its priority and also receive notifications about its fix implementation. As a workaround, you can properly remove the user from the group using the Jira User Interface.
Let us know if you have any questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.