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

Jira Cloud User Automation Question

ivan.korogodin August 4, 2022

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

Comment

Log in or Sign up to comment
Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 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.

ivan.korogodin August 4, 2022

Thank you so much!

ivan.korogodin August 4, 2022

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

Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 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 

ivan.korogodin August 5, 2022

Thanks!

TAGS
AUG Leaders

Atlassian Community Events