I'm writing scripts to help my company identify Jira/Confluence users who have not logged in for some amount of time and disable their accounts.
I've looked at the endpoint for getting all users and there's not information returned regarding login info. I checked each of the user options and it appears that none contain that field.
Can someone help me identify where that information exists using the API?
Hello @Scott Reopelle
Alternatively, you can try the additional plugin, such as our Issue History. It allows you to view all history of changes that have been made with the issues. You can optionally filter issue list by the user who made changes. That will help you see the entire activity history of a particular user, including the time of his /her last activity.
Hope it helps
Best Regards
Hello @Scott Reopelle
Welcome to Atlassian Community!
Unfortunately, It is not possible to return only the specific date/time a user logged for the last time in any products, however, this information can be collected together with other details by using the expand=attributes parameter and checking the productPresenceList:
https://xxxxx.atlassian.net/admin/rest/um/1/user?email=xxxxx&expand=attributes
Can you check if the call above works for what you need?
In order to specifically get that information, I recommend you vote and watch the suggestion created below to increase its priority and also receive notifications about any updates:
Add "Last Jira login date" and "Last Confluence login date" to REST API user calls
Let us know if you have any questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm unable to connect and continue to get "User failed to authenticate". I am using my API key, but it's unclear if that only works when I call api.atlassian.com or if I can use that for my workspace as well..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Scott,
Can you please provide us what are the steps you are taking to authenticate? also, are you facing the same error when you simply run that call in your browser?
Additional to that, please make sure your user is configured as a site-admin to get that kind of information from the API call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Petter Gonçalves is this endpoint: https://xxxxxxx.atlassian.net/admin/rest/um/1/user?username=xxxx&expand=attributes working for JIRA cloud? I tried to call this via Postman and username+api key, but its failing. Even though I am Site + Org admin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Lars Stuber
The username parameter was deprecated from Jira REST API due to the GDPR implementation:
That being said, you must use the AccountId or email parameters to properly return the users, as mentioned in the documentation below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Petter Gonçalves, Replaced the username with accountId but did not get the last login in the response. Apparently "expand" only accepts groups and applictionRoles.
Is there any other way to get the last login activity of the user?
Thank you,
Akhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see the same as Akhil reported: expand only accepts groups and applicationRoles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.