Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

For a given userid , is there a way to remove all the group membership through api ?

Sachin Ramaprasad September 23, 2019

Presently we have an api to remove user's group membership for a given group name but is there a way to remove membership for a given user ? This is especially required when you are automated 'deactivating users' but challenge lies in removing group membership. Without doing this , user would still appear in other atlassian tools group and I'm trying to eliminate this. Please suggest.

 

Thanks,

Sachin

1 answer

0 votes
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2019

@Sachin RamaprasadTake a look at this API - https://docs.atlassian.com/atlassian-crowd/3.6.0/REST/#admin/1.0/users-addUserToGroups

I think this is incorrectly documented, it removes user from multiple group.

Sachin Ramaprasad September 24, 2019

@DPKJ  , thanks for your response.

 

I tried this in two methods. First with using application credentials and then with local admin credentials. I got 401 & 404 error respectively.

Does the admin call works on crowd server ?

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2019

@Sachin Ramaprasadthey work, but not able to see how you got 401 or 404 response.

404 implies page does not exists.

Sachin Ramaprasad September 25, 2019

From the above rest api doc, 401 is when user doesn't have permission to execute the operation and 404 is when user doesn't exist. In my case , both are invalid response as I'm using correct application and i have used crowd admin credentials.

Could you send me the query how you are using it in curl ? (feel free to exclude credentials)

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2019

@Sachin Ramaprasad  I need to search for this, but I will get back to you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events