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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Difficulty managing user management REST API

I am a:

  • site administrator
  • administrator
  • jira-administrator
  • organization administrator

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.

 

1 answer

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!

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you