0

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

weclu
  • 1

1 Answers1

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.