I am a:
I create a 7 day API key at admin.atlassian.com / settings / API keys; the key doesn't expire until 11/25/2019.
I'm running JIRA Cloud. Following the instructions at https://developer.atlassian.com/cloud/admin/user-management/rest/
I pick a user that I ultimately want to disable, but for the moment, let's just look at what I can do to that account:
https://api.atlassian.com/users/557058:f4689d7f-1829-4214-a5fb-c0573887d468/manage
(I'm not concerned about security here - anybody other than me shouldn't be able to do anything with that account ID anyway.)
My header reads:
Authorization: Bearer {api token}
I get back:
403 / Forbidden.
Maybe the URL is wrong? So I try https://api.atlassian.com/admin/users/557058:f4689d7f-1829-4214-a5fb-c0573887d468/manage and that gets me a 404 / Not Found error.
Obviously, I'm doing something basic incorrectly here, because this is as about as straightforward as it can be.
First of all, thank you Lee, for posting this, because reading through it helped me to realize that I needed an organization API key rather than a personal one. After doing that I was able to get the api you referenced to work (the first one): /users/[user account id]/manage.
The only issue that I can think of that might be causing you difficulty would be setting up managed accounts. The user management API only works for managed accounts and you have to claim the domain for the email addresses you want to manage. If you haven't done so please take a look at the documentation that can be found by following the link below about setting up managed accounts and verifying a domain.
Link for managed accounts/verifying domain:
https://confluence.atlassian.com/cloud/verify-a-domain-for-your-organization-873871234.html
Hope that helps!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.