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

  • SEARCH
  • Home
  • 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 322295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:55:32+00:00 2026-05-12T08:55:32+00:00

The project I am working on will integrate with the customers Active Directory in

  • 0

The project I am working on will integrate with the customers Active Directory in order to authenticate users. I have been trying to write some code that will retrieve a users password and I understand that Active Directory will only expose the relevant properties over a SSL connection on port 636.

The following code connects programmatically without using SSL but then I can’t see the password properties:

static void Main(string[] args)
{
    DirectoryEntry entry = new DirectoryEntry(@"LDAP://<IP>/CN=LDAP Test,CN=Users,DC=customer,DC=com");
    entry.AuthenticationType = AuthenticationTypes.None;
    entry.Username = "CN=LDAP Test,CN=Users,DC=customer,DC=com";
    entry.Password = "<password>";
    if (entry != null)
    {
        foreach (Object propName in entry.Properties.PropertyNames)
        {
            Console.WriteLine((String)propName);
        }
    }
}

When I change the code to use SSL I get an exception stating ;Unknown error (0x80005000)’.

I have enabled SSL on the server hosting Active Directory, installed a Microsoft CA on the same server and obtained a certificate from the CA.

I can connect to the Active Directory over SSL using Apache Directory Studio but that does not show the password properties.

The following code shows what I have been trying to use to connect using SSL:

static void Main(string[] args)
{
    DirectoryEntry entry = new DirectoryEntry(@"LDAPS://<IP>:636/CN=LDAP Test,CN=Users,DC=customer,DC=com");
    entry.AuthenticationType = AuthenticationTypes.SecureSocketsLayer;
    entry.Username = "CN=LDAP Test,CN=Users,DC=customer,DC=com";
    entry.Password = "<password>";
    if (entry != null)
    {
        foreach (Object propName in entry.Properties.PropertyNames)
        {
            Console.WriteLine((String)propName);
        }
    }
}

I’m not sure where to go with this and some assistance would be greatly appreciated.

  • 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-12T08:55:33+00:00Added an answer on May 12, 2026 at 8:55 am

    I have been trying to write some code
    that will retrieve a users password…

    This is unrelated to your SSL problem, but I don’t think retrieving a user’s password from Active Directory is possible. It only stores a hash and that’s why you aren’t receiving any kind of “password” property when querying the user’s properties.

    Updated Answer

    After reading your comment, it appears you’re looking for the unicodePwd attribute which contains the security hash. According to the MSDN information, writing to that attribute requires the special SSL connection but you still won’t be able to read it because it’s a write-only attribute.

    Specifically from MSDN:

    The unicodePwd attribute is never returned by an LDAP search.

    Here’s also a forum post that I found that seems to say the same thing:

    The users’ password is stored in the
    Active Directory on a user object in
    the unicodePwd attribute. This
    attribute can be written under
    restricted conditions, but it cannot
    be read due to security reasons.
    (Source)

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

Sidebar

Related Questions

I´m working on a project that basically will show some data collected from hardware
I'm working on a small project trying to integrate lua with c++. My problem
i will be working on a project that tries to determine your position using
I'm working on a project that will be distributed with GNU autoconf/automake, and I
I am working on a project where the user will transfer his username to
I'm working on a web project that will (hopefully) be available in several languages
I'm working on a project with a friend that will utilize Hbase to store
I am currently working on a project that will store specific financial information about
I'm currently working on a project which will support multiple file writing specifications (imagine
I'm working on a personal project (C# / ASP.NET) that will use LINQ to

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.