Hello all,
We are Jira Cloud users. Reaching out to you all with few queries
1. How to get the list of Inactive users?
2. We are creating a POC for automating 'Inactivating user record(s)' using Informatica. This is to replace a manual process. How to obtain the 'Last Modified By' and 'Last Modified Date' of an Inactive user record?
3. How to activate an Inactive user in Jira Cloud instance (for testing purpose)?
I see that there are several apps out there for 'Managing Inactive users for Jira' but would prefer a solution without having to install any app.
Any help is highly appreciated!
Thanks in advance!
To retrieve a comprehensive list of users, use this RESTAPI endpoint, substituting your site GUID in the {SITEGUID} field
https://admin.atlassian.com/gateway/api/adminhub/um/site/{SITEGUID}/users?count=100&start-index=1
Users can only be gathered 100 at a time, so increment the "start-index" field by 100 each time until all records are received.
Each JSON record returned has an "activeStatus": field that returns either "DISABLED" or "ENABLED". This answers point (1) above.
Also, each record also contains a "presence" field that is the last login time:
"presence": "2021-09-17T12:28:53.653554Z"
That answers point (2) above.
To activate an inactive user, use this RESTAPI point:
POST to:
https://admin.atlassian.com/gateway/api/users/{USERGUID}/activate
https://admin.atlassian.com/gateway/api/adminhub/um/site/{SITEGUID}/users/{USERGUID}/deactivate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Simpson Great answer. Can you point us to some online documentation for this Admin API? It appears to be separate from the normal Jira Cloud REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Mark Simpson, but I don't see the /api/users and /api/adminhub requests documented at that link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mykenna Cepek - from my notes, I can only find references to other community posts where these RESTAPI endpoints are mentioned. Indeed, in the first post Petter Gonçalves from Atlassian suggests that "the endpoint is not official, not documented, and may change over time."
For user retrieval my starting point reference was:
For deactivating users, I found this syntax here:
Best,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This sounds like a concern for some standalone automation. From @Mark Simpson's first link above:
...as a possible workaround, you can grab the cookie from an active site-admin session from the browser and then use it to authenticate a REST API POST request...
and:
...this is just a workaround, the endpoint is not official, not documented, and may change over time.
Cookies expire, of course. This doesn't sound like a solid option for a general desire to help "managing users".
But this approach might be ok for a manual, one-time (or occasional) thing -- some bulk cleanup, for example.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get a list of inactive users, the Jira Cloud REST API call to "Bulk get users" includes a field per-user for "active".
I don't see that any of the User related API calls include any "Last Modified" metadata per user record. Might be worth trying some of the User API calls just to ensure that the docs aren't out of date.
I'm not sure that data is persisted, although I could see that it might be in the audit log for a period of time. However, the Jira Admin UI does not currently seem to show any "Last Modified By" data when activating / inactivating users, and neither does the Audit Log.
I believe that Apps have more access to Jira internals than the REST API offers.
You can manually activate an inactive user in the Jira Admin UI for Users by clicking the "Grant site access" link. It's recommended to review the individual products they will then be able to access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Mykenna Cepek for such detailed & prompt response! Let me try out Jira Cloud REST API calls & will share my findings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also noticed that the Jira Cloud REST API does include some access to the Jira Audit Log:
There might be some data in there about who changed User Records.
More about the Audit Log in general here:
https://support.atlassian.com/jira-cloud-administration/docs/audit-activities-in-jira-applications/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Become an effective Jira admin
Manage global settings and shared configurations called schemes to achieve goals more quickly.
Streamline Jira administration with effective governance
Improve how you administer and maintain Jira and minimize clutter for users and administrators.
Learning Path
Become an effective Jira software project admin
Set up software projects and configure tools and agile boards to meet your team's needs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.