Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

List of Inactive users in AEM

Avatar

Level 6

Hi Dears,

 

Is there a way we can fetch list/details of users who did not logged into AEM from past 6 months?

Kindly provide info if any..

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can try with below 


p.hits=selective
p.limit=-1
path=/home/users
type=rep:Token
relativedaterange.property=rep:token.exp
relativedaterange.upperBound=-180d
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) 

View solution in original post

5 Replies

Avatar

Community Advisor

One way to find the list of inactive users past xx days is via Query Builder.

p.hits=selective
p.limit=-1
path=/home/users
type=rep:User
relativedaterange.property=lastLogin
relativedaterange.upperBound=-180d
p.limit=-1

http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=p.hits%3Dselectiv...


BrijeshYadav_0-1667214570070.png

 

 

Avatar

Correct answer by
Community Advisor

You can try with below 


p.hits=selective
p.limit=-1
path=/home/users
type=rep:Token
relativedaterange.property=rep:token.exp
relativedaterange.upperBound=-180d
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)