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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to disable user via Rest Api

I would like to disable/suspend a user via Rest Api.

I last try was to send the action = false to /rest/api/2/user but it only ends up with a 405 method put not allowed.

I am stuck is this problem for longer. I struggle a lot with Atlassian because every time I try to look for something I end up on a community/forum post because the documentation is not very helpful.

As far as I have gotten is getting the account Id, display name and email. But with that information I never found out where to send the request to disable the user.
As far as I am aware I have to disable the user instead of deleting it because otherwise information like who posted gets lost.

1 answer

1 accepted

2 votes
Answer accepted
Gareth Cantrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 09, 2022

@Kurt Oeffner user management in Cloud applications is separate to the application and must be done through the Cloud Admin API, rather than the product API.

You can find more about user management using the Cloud Admin API here: https://developer.atlassian.com/cloud/admin/rest-apis/

Best regards,

Gareth

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 09, 2022

I recently discovered this API and played with it just a little. Didn't try disabling any users (ours are Managed, so I don't think it's even possible), but I did figure out how to format the authentication header, which might be helpful:

Authorization: Bearer YOURAPIKEY

Thank you @Gareth Cantrell, you are amazing!


I saw that page before but I didn't realize the base url and auth were different.
Got the new API key, verified my domain and got it working.

Hi @Darryl Lee 

Please correct me if I understood incorrectly:

- the admin API edit/suspends the on the on the Atlassian directory

- If I suspend a user, it will loose access to all Atlassian product (Jira, confluence, bitbucket, trello etc..) from owned by us but also owed by other companies.

- I cannot manage an user if it is not in our managed domains, for example if it is a customer email.

It is correct?

Thanks.

How can I disable a user in confluence using rest api..??

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events