You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
@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/
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
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?