How to get the list of users who are inactive past 60days? | Community
Skip to main content
Employee
November 23, 2022
Solved

How to get the list of users who are inactive past 60days?

  • November 23, 2022
  • 2 replies
  • 2416 views

Hi,

 

How can we get the list of users who are inactive past 60 days either by using query debugger or java code.

I referred this 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/list-of-inactive-users-in-aem/m-p/555260

but not sure whether this is correct way bcz it only lists the users having tokens.

 

Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by KNan

Hi ,

 

AEM by default doesn't capture user login timestamp and you will need to build a custom solution in order to achieve this.

 

Please check this wonderful article on details of how this can be achieved.

https://medium.com/tech-learnings/adobe-experience-manager-reporting-on-users-last-login-date-e20350...

 

Hope this will help you.

 

Thanks

 

2 replies

BrijeshYadav
New Participant
November 23, 2022

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/list-of-inactive-users-in-aem/m-p/555626#M137930


You can achieve by Query builder also. Check the below command

p.hits=selective
p.limit=-1
path=/home/users
type=rep:Token
relativedaterange.property=rep:token.exp
relativedaterange.upperBound=-60d
p.limit=-1

But it will give you duplicate entries in result because a user can have multiple tokens stored so to avoid duplicate entries you can run the token cleanup task (com.day.crx.security.token.impl.TokenCleanupTask) or with use some Java utility class.

Employee
December 8, 2022

Hi @brijeshyadav 

 

Can we use property "rep:lastSynced" to check the login time. Instead of tokens, cz few users might not have tokens?

BrijeshYadav
New Participant
December 8, 2022
KNanAccepted solution
New Participant
November 23, 2022

Hi ,

 

AEM by default doesn't capture user login timestamp and you will need to build a custom solution in order to achieve this.

 

Please check this wonderful article on details of how this can be achieved.

https://medium.com/tech-learnings/adobe-experience-manager-reporting-on-users-last-login-date-e20350...

 

Hope this will help you.

 

Thanks