Access ldap user attributes during customer login

I’ve integrated microsoft active directory as user directory in confluence. Now let’s say I receive following ldap info in java variables given on left:
principal name: userPrincipalName
email: mail
How should I access user based on ldap attributes. Is there any userAccessor like interface for ldap?

A little insight:
I’m trying to implement SSO using microsoft active directory as user directory. So my IdP sends some value in SAML response, I catch that in userPrincipalName. Then I want to search for that userPrincipalName in the AD to get the username of that user and log him in.

Hi @ankit,

Atlassian Crowd gives you the ability to implement SSO with Microsoft active directory. So I’m wondering why you are rebuilding that functionality.

Thanks for responding. I’m trying to include this functionality as a part of sso add on. As you said, crowd is also providing that functionality. So can you please tell me if I can use any crowd APIs to achieve the same?

Thanks in advance.