List of Inactive users in AEM | Community
Skip to main content
akhilraj
Level 5
Oct 30, 2022 4:56 AM UTC
Solved

List of Inactive users in AEM

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..

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrijeshYadav
BrijeshYadavAccepted solution
Level 5
Nov 1, 2022 9:29 AM UTC

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) 

5 replies

BrijeshYadav
Level 5
Oct 31, 2022 11:10 AM UTC

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%3Dselective%0D%0Ap.limit%3D-1%0D%0Apath%3D%2Fhome%2Fusers%0D%0Atype%3Drep%3AUser%0D%0Arelativedaterange.property%3DlastLogin%0D%0Arelativedaterange.upperBound%3D-1d%0D%0Ap.limit%3D-1


 

 

Translate
akhilraj
akhilrajAuthor
Level 5
Oct 31, 2022 2:57 PM UTC

Hi @brijeshyadav : getting 0 result for this query execution

 

Translate
BrijeshYadav
BrijeshYadavAccepted solution
Level 5
Nov 1, 2022 9:29 AM UTC

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) 

Translate
Manu_Mathew_
New Participant
Oct 30, 2022 8:53 AM UTC

@akhilraj This blog might give you some insitghts on this:

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

 

Hope this helps.

Translate
Level 3
Oct 30, 2022 1:31 PM UTC

Hi @akhilraj ,

 

Please follow this post it might be helpful in your case.

 

https://blogs.perficient.com/2017/02/23/managing-ghost-users-repository-growth-in-aem/

 

Thanks,

Mahesh 

Translate