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?
Hi,
you can combine two endpoints from the
The Organizations REST API REST API
Get all users from your org
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
Recommended approach:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.