Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
SOLVED

List of Inactive users in AEM

Avatar

Level 5

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

0 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)