Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 689465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:20:06+00:00 2026-05-14T02:20:06+00:00

I have a Java app that can authenticate to LDAP by logging users into

  • 0

I have a Java app that can authenticate to LDAP by logging users into the AD LDAP server with the NTLM name (which they are used to – this is a requirement).

I now also need to do authorization, and hence need to find a forest-unique identifier for the user (DN or UPN should work), from which I can further query the directory.

The method needs to be absolutely portable, even if the AD is structured in an unusual fashion, otherwise I could just do a string replacement and search for a UPN of “${ntlm-user}@${ntlm-domain}.${configured-trailing-domain}”

How can I do this, using pure LDAP?

Currently, I’m using the java.naming.directory package, which I’d like to keep using, since it doesn’t throw up problems when not binding with a DN but logging in with an NTLM name?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:20:06+00:00Added an answer on May 14, 2026 at 2:20 am

    First, UPN isn’t a required field by AD, unless you’re running in a Windows 2003 Server environment or higher. Win2000 domains (actual or functional) may not have UPN’s.

    sAMAccount name is the only required field that is completely portable throughout the different versions of LDAP. However it’s typically used inconjunction with the netbios domain name

    (FOOBAR\JSKEET)

    Using pure LDAP, you can do a Bind (make sure you can set the sealing and secure flags so you do a secure authentication!) with either the UPN or sAMAccount name (and even the full DN if thats all you have).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have around 4000 entities that I need to insert into a Java App
I have a Java app that runs on a server present in USA. My
I have a java app that runs on multiple computers and they all connect
I have a web app that users upload files to. I want to authenticate
I have a java server app that download CSV file and parse it. The
I have a java app that creates a socket to talk to a server
I have a working Java app that can find the most recently created file
I have a java app that uses log4j. Config: log4j.rootLogger=info, file log4j.appender.file=org.apache.log4j.DailyRollingFileAppender log4j.appender.file.File=${user.home}/logs/app.log log4j.appender.file.layout=org.apache.log4j.PatternLayout
I'm have a Java app that also runs as an applet. The app also
I have a large Java app that uses massive amounts of memory at times

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.