I started to use the unboundid SDK to connect and work with LDAP/AD. With the WhoAmIExtendedRequest
i can get the samaccountname. But who can i get the user and the full username? Is there an other request or a DN?
Thanks
Asked
Active
Viewed 167 times
0

weclu
- 1
-
1Can you show your code? – Gabriel Luci Dec 10 '21 at 15:46
-
WhoAmIExtendedResult whoAmIResult = (WhoAmIExtendedResult) ldap.processExtendedOperation(new WhoAmIExtendedRequest()); – weclu Dec 13 '21 at 06:39
-
Please provide enough code so others can better understand or reproduce the problem. – Community Dec 16 '21 at 14:19
1 Answers
0
When a result (i.e., a WhoAmIExtendedResult
) is obtained from Active Directory, you should be able to use the WhoAmIExtendedResult.getAuthorizationID()
method to obtain the DN of the authenticated user. An example is described in the Javadoc for the class, but the authorization ID returned by the AD server could take one of the following forms:
dn: uid=username,ou=clients,dc=example,dc=com
u: uid=username
- The empty string or just "
dn:
", indicating an anonymous bind.

applejohnnyseed
- 1
- 1