Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,276
Community Members
 
Community Events
184
Community Groups

API - Filter using lastLoginDate not working

Date filter not working for lastLoginDate key however it is working for other date keys like createDate or lastModified

rest/align/api/2/users?filter=lastLoginDate gt 2020-05-11T06:48:00Z

I want to disable the Last 90 days Inactive users so I need the filter in lastLoginDate key. Kindly help me in advance.

 

3 answers

1 vote
Rodrigo Cortez
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 10, 2021

Hi there -- we wanted to let you know that a new enhancement request has been created today for having this property searchable/filterable.

Should you're interested, feel free to join Ideation portal (open for current Jira Align customers & prospects) and upvote for it.

0 votes
Rodrigo Cortez
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 26, 2021

Hi @Mohamed Musheer ,

The lastLoginDate property is a read-only object that is not meant to be filterable via API calls.  We have a defect report on this case, as this property should be marked as NonSearchableProperty:  https://jira.atlassian.com/browse/JIRAALIGN-3085

Please subscribe to this bug should you wanna get notified when it is resolved.

 

In case you want this property to be searchable & filterable, I'd recommend you to log a new Idea in the public Ideation portal.  Here's how.

 

Hope it helps!

Hi @Rodrigo Cortez ,

If you can see the other date fields like createDate and lastModified are also a read-only object but can be filtered via API.
If lastLoginDate is not ment for filterable please provide me a solution for my problem

"I want to disable inactive users for last 90 days how do I get the inactive users via API ?"

Rodrigo Cortez
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 27, 2021

As a workaround, you can export all of your active users, then manually filter the results.

Dear @Rodrigo Cortez ,

Can you please suggest the answer

Rodrigo Cortez
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 14, 2022

In addition to the manual workaround previously shared, if you're an Enterprise Insights customer, you can use the below query to return the userID and other relevant information for all active users that haven't logged into Jira Align in the past 90 days. 

SELECT
    u.[Username] as 'userID',
    u.[First Name] as 'First Name',
    u.[Last Name] as 'Last Name',
    u.[email] as 'Email',
    uf.[login timestamp] as 'Last Login Time'
FROM current_dw.[user login fact] uf
    INNER JOIN (
        SELECT [FK User ID], max([login timestamp]) as MaxDate
        FROM current_dw.[user login fact]
        GROUP BY [FK User ID]
    ) time_stamp ON uf.[FK User ID] = time_stamp.[FK User ID] and uf.[login timestamp] = time_stamp.MaxDate
    INNER JOIN current_dw.[user] u ON uf.[fk user id] = u.[user id]
    AND uf.[login timestamp] <= DATEADD(day, -90, GETDATE())
    AND u.[User Active Flag] = 'YES'
ORDER BY uf.[login timestamp] DESC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events