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

Crowd script that can find users who have been inactive for more than X days and deactivate them

P March 10, 2021


As my title states I need help developing a script that can find crowd users who have been inactive for over X days and deactivate them. 

I was hoping someone could share a script I could use as my starting off point and tweak it if necessary. 

I've researched this topic a bit and think Crowd Rest APIs would be what I need to use, but I am open to any suggestions. 


A few things to note, we do not have scriptrunner in our environment, so my plan was a to develop a script I could set as a cronjob to be run once a month. 

1 answer

0 votes
Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 13, 2021

Hey @P 

If you have direct DB access, this is a much more straightforward process - if so, MySQL/PSQL/MSSQL?

However to start, how do you define "active"? 

We've struggled with this - if you're using Jira/Confluence etc as apps connected to Crowd, if you have say 10 users in Crowd (User1 , User2 ... User 10) and they're all synced to Jira and Confluence - User1 may be the only user logging in to Jira/Confluence and assigning/at mentioning  user2,3,4,5,6 etc - those users get email notifications, reply via email, their replies are then ingested in to the tickets/pages in jira/conf - thought they have never logged in to the webui, so Crowd does not timestamp their lastAuthenticated attribute. If you disable User2-10 in Crowd, User1 can no longer do their job as expected.



P April 14, 2021

Thanks for the reply!


I do have direct access the the Postgres DB. 

Also to answer your question about defining activity. 

I'm fine with lastAuthenticated attribute being the metric, we use to define it. 

Because if they really need access they will reach back out and I can restore their access. 

We have the 2000 user license. So it wont be that troublesome. 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events