Update ldap user attributes using confluence java api

Ankit
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 30, 2017

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:

username : sAMACCOUNTNAME

principal name: userPrincipalName

email: mail

How should I access user based on ldap attributes. Is there any userAccessor like interface for ldap?

1 answer

0 votes
Lars Olav Velle
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2017

Ankit,

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 https://community.developer.atlassian.com 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 :)

 

Lars,

Kantega Single-Sign-on

Ankit
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 30, 2017

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.

Lars Olav Velle
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2017

Yes,

Thats exactly what our add-on does. :)

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

Chreers,

Lars

Ankit
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 2, 2017

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
TAGS
AUG Leaders

Atlassian Community Events