It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Update ldap user attributes using confluence java api

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?

1 answer


What are you trying to accomplish? Your question is rather difficult to uderstand when you partly try to answer your own question.

If you are building an add-on then perhaps is the best place to ask. 

Our Single Sign-on add-on has the ability to use the client kerberos ticket, extract the userPrincipalName and based on your settings in the user directory find the email attribute of the user that logs in, which may be something similar to what you are trying to do.

If you could be more specific, I might be able to answer your question :)



Kantega Single-Sign-on

Thanks Lars,

I'll post the question indeveloper forum as well and will try to be more specific this time. 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.


Thats exactly what our add-on does. :)

Have you concidered buying any of the current SSO add-ons on the marketplace?



Well, I'm trying to build my own. :) If you could just point me in the right direction as to which API class can help me, I'll be grateful. :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Confluence Server & Data Center 7.0 is here!

Hello Community 👋🏼 I’m Makisa, a product manager on Confluence Server and Data Center. Confluence Server & Data Center 7.0, our latest platform release, is now available and we wanted to shar...

157 views 0 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you