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.
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?
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
It looks like you're new here. Sign in or register to get started.