Get users in an organization API returns inaccurate 'last_active' time

Hi everyone,

I have an organization with a verified domain and few managed accounts.
When I use the following Rest API: GET /admin/v1/orgs/{orgId}/users
it returns the list of accounts and for each account there is “last_active” time and list of “product_access” where for each product there’s another “last_active” attribute.

I see that the last_active time isn’t updating, the general “last_active” time shows that the last time I was active was 2 days ago while I’m using Confluence and Jira every day. For instance, if I open the general settings => User Management => Users - it shows the correct last activity time.
Is there any statement I’m missing when this information is getting updated?
How can I get the correct and up to date “last activity” time for my organization’s users?
Any solution to get the correct last activity / last login / last action time for my users using API will be great!

I’ll appreciate any help with this issue since we are struggling with this issue for a long time.
Thanks in advance!

an update - if I open the organization settings, under Directory => Managed Accounts - I see the list of product access for my account and the “Last active” time over there is also incorrect (like the api returns)

@TomKeidar - just found a bug report on this very issue.

https://jira.atlassian.com/browse/ACCESS-671

Please upvote and make a comment on the issue. It’s currently listed as a low priority, so if there’s significant business impact, I suggest letting the team know in your comment.

@TomKeidar
Currently, there is no public API available for retrieving this information. However, if you’re willing to explore Atlassian’s internal APIs in more depth, you may find an endpoint that provides the data you’re looking for. Keep in mind that internal APIs are undocumented and can change without notice.

In the request, pass the Organization ID in the URL and provide the user IDs in the request body. The response will contain the corresponding user activity details, including the last active information for the specified users.

Example:

Request:

POST https://admin.atlassian.com/gateway/api/admin/v1/orgs/12345678-abcd-1234-abcd-123456789xyz/directory/users/last-active-dates

Request Body:

{
“accountIds”: [
“user-1001”,
“user-1002”,
“user-1003”
]
}
Response:
{
“data”: [
{
“accountId”: “user-1001”,
“lastActive”: “2025-05-10T08:30:00.000Z”
},
{
“accountId”: “user-1002”,
“lastActive”: “2025-02-15T14:20:00.000Z”
},
{
“accountId”: “user-1003”,
“lastActive”: “2024-12-01T09:45:00.000Z”
}
]
}

You can then compare the lastActive date with the current date to identify users who have been inactive for more than X days.

There is… Read the post.