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 791291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:48:43+00:00 2026-05-14T21:48:43+00:00

Is there a way to connect my flex web application to Active Directory, and

  • 0

Is there a way to connect my flex web application to Active Directory, and get the logged username?

Right now we have a PHP script connected to the flex application, that gets user/pass input from the user and checks if there’s such user in the AD, and that the password is correct.

I don’t want to ask for user/pass, but to make the application get the domain username that connected to it, so I could use it (check if the user has access to my application and such).

Is there a way to do so?

  • 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-14T21:48:43+00:00Added an answer on May 14, 2026 at 9:48 pm
    <?php
    
    // using ldap bind
    $ldaprdn  = 'uname';     // ldap rdn or dn
    $ldappass = 'password';  // associated password
    
    // connect to ldap server
    $ldapconn = ldap_connect("ldap.example.com")
        or die("Could not connect to LDAP server.");
    
    if ($ldapconn) {
    
        // binding to ldap server
        $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
    
        // verify binding
        if ($ldapbind) {
            echo "LDAP bind successful...";
        } else {
            echo "LDAP bind failed...";
        }
    
    }
    
    ?>
    

    When your application is launched, you need to access the LDAP with the windows login credentials.

    `AUTH_USER` request variable is the one which you have to check. 
      This will hold your Windows login username and AUTH_USER will be 
      MYDOMAINNAME\user.name
    

    The username/password I need for this,
    is that admin credentials, or any user
    on the system?

    You can get the username alone, not the password… when the user logs into his window’s machine, we can check his credentials using Environment.username in C# and in PHP we can use AUTH_USER to verify the user logged in is valid.

    Plus, do you know where can I find a
    list of variables (like auth_user) of
    which information can I get?

    https://www.php.net/manual/en/ref.ldap.php

    You can get a lot of information from the above link.

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

Sidebar

Related Questions

Is there any way to get Flex Builder to connect to an existing browser
We have Flex applications that connect to our ASP.NET 3.5 Web Applications and usually
is there a way to connect mysql to visual web developer like it's connected
Is there a way to get character offset from a position? I have a
Is there a way to connect to a db with Integrated Security from multiple
A friend of mine told me there was a way to connect two private
Is there way in next piece of code to only get the first record?
i hired a designer who knows flash but not flex, is there a way
Is there a way to connect code to a view's 'back' button that is
Is there a way to connect to a remote sql server using management studio

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.