The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I want to develop a plugin to remove users from JSM sites based on last active

d_b_kumar_chauhan
March 23, 2026

Hi everyone,

I want to develop a plugin to remove users from JSM Cloud sites based on their last activity. Could anyone help me with the following points?

How can we fetch all users along with their timestamps?

How can we create a Forge plugin that triggers automatically?







1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Kai Krause
Community Champion
March 23, 2026

Hi,

you can combine two endpoints from the 

The Organizations REST API REST API 

Get all users from your org

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

and then get all timestamps

https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v1-orgs-orgid-directory-users-accountid-last-active-dates-get

and then remove 

https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-accountid-delete

To run automaticly you can use the 

Scheduled trigger

I think it would be good  to

  • Never immediately delete users
  • First log them
  • Optionally notify admins
  • Maybe deactivate instead of delete
  • Respect GDPR

 

Recommended approach:

  1. Detect inactive users
  2. Store list in Forge storage
  3. Send email via notification
  4. Remove after X days grace period


    BR
    Kai 

 



DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events