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

Need LDAP user details in AEM JAVA service


Level 4

Hi Team,


We are integrating .net code to AEM.

In .net we have a method to get logged in User Roles. They are taking the same with below lines.

WindowsPrincipal winPrincipal = (WindowsPrincipal)HttpContext.Current.User;

In AEM we tried with 

UserProperties userProps = request.adaptTo(UserProperties.class);

 But it is not working, Do You have any suggestions here ?

5 Replies


Level 5

Does the node property exists, when you take a look in CRX?


Community Advisor

Hi @akhilr48142671 


You can pick the user properties from the Authorizable. Below is the code snippet of that.


ResourceResolver rr = request.getResourceResolver();
Authorizable userAuthorizable = rr.adaptTo(Authorizable.class);
String familyName = userAuthorizable.getProperty("email").toString();

Please let me know if this helps.





Level 4

Hi @JeevanRaj and @Magicr ,


Actually this user is not AEM user. It is kind of windows user and we have to fetch his role, like, developer /Manager/ Executive etc.

I believe we need to integrate LDAP mechanism here.




Community Advisor

Do you have the LDAP integration in place? If yes, are you able to login through LDAP? Once the "windows user" logs in into aem, the user will be created in aem. You will be able to fetch the user details using the user Authorizable.


Level 4

Hi @JeevanRaj : 

We have implemented a LDAP code and deployed in AEM.

It was working fine in local instance with System.getProperty( and we were able to fetch our details.

But wen we deploy to our dev servers, this line of code is  giving  value as  "aem"  instead of actual windows login. I think we may need some more configuration to do in AEM.


Any idea?