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

Rest API endpoint to get inactive user ID

Hi everyone.

I need to be able to get the Active and INACTIVE user account ID using the user account email.

At the moment I am able to get ACTIVE users id by hitting the endpoint:
https://<my domain>.atlassian.net/rest/api/latest/user/search?query=user.email@mydomain.com.

Unfortunately, this endpoint does not return the ID if the user is INACTIVE.

Does anyone know how I can get the user account ID for inactive users?


1 answer

1 vote
Prince Nyeche Community Leader Feb 24, 2021

Hi @Joao Zampa 

Welcome to community! While using the search user endpoint, rather than calling one user at a time by defining an email, don't use the query parameter. Instead use the startAt parameter (which searches record by record) and run a loop to call all user and filter the data by "active" status. 

 "active": false

Then you can grab the users that are returned. However I would say you should filter by "accountType" as you don't want to include app users as well.

Thanks @Prince Nyeche , 

I will try to figure out how to use it, one quick question, we have around 40k accounts, do you foresee an issue?

Prince Nyeche Community Leader Mar 01, 2021

There shouldn't be an issue. I'm assuming the 40k accounts are referring to customer only accounts? Then I would suggest you use the filtering of

"accountType": "customer"

This way you can get only customer only account rather than agent or Jira user account.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

235 views 1 6
Read article

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