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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,464,103
Community Members
 
Community Events
176
Community Groups

Jira Cloud User Automation Question

Hi everyone, 

What are the ways if there are any to automate user deactivation/deletion in Jira cloud after a specific period of time user being inactive? 

Thanks for any help.


1 comment

Eugenio Onofre Community Leader Aug 04, 2022

Hello,

I implemented it using the Atlassian APIs and creating a Python script to interact with them. We basically get the "Last seen" date of all the users and check if the date is past X days.

If the condition matches, we call the API to disable the user:
https://developer.atlassian.com/cloud/admin/user-management/rest/api-group-users/#api-users-account-id-manage-lifecycle-disable-post

Regards.

Thank you so much!

Oh another question, how do you get the "Last seen" date for each user?

Eugenio Onofre Community Leader Aug 04, 2022

You can get this information on the Admin page by exporting all users to CSV. This is a default field on the CSV export.

You can also use the "Get Users in Organization API". A field called "last_active" will be returned on the JSON:

https://developer.atlassian.com/cloud/admin/organization/rest/api-group-orgs/#api-orgs-orgid-users-get

Regards,
Eugenio 

Comment

Log in or Sign up to comment