2 comments on “Authenticating users in an Active Directory Trusts with ColdFusion 2016

  1. Hi Bryan. Nice article. I’ve been searching all over the web but have not found a solution. My problem is how to authenticate user (& password) using LDAP against Active Directory that doesn’t allow anonymous bind (must bind/connect using Service Account).

    So, I can bind and connect using the Service Account and filter the actual username to verify that the user(name) is valid and exists. However, I can’t a second set of the password (the actual user password) in the CFLDAP parameters.

    The username and password parameter was used for the Service Account username and Service Account password. We are using ColdFusion 2018 in an Linux environment. So far, I have googled a lot and haven’t found an solution.

    We have ColdFusion support but our CF Admin (an network admin) is out this week and I’m one of the developer that’s not registered to submit a support request ticket. Do you have any idea on how to do this authenticate username and password against Active Directory that comes default with not accepting anonymous bind/connect and must use Service Account to connect. Thanks in advance for any advice and/or solution.

    • Hi John

      If I understand your question correctly, you are asking how to authenticate someone’s username and password in ColdFusion. Let me explain the process I use.

      1. The visitor is presented with a Login Form and they enter their information and press “Login” button.
      2. I use their username and password to login to Active Directory; and with their credentials, I query for the necessary information the app needs such as group membership, etc. If their username and password fail, then there is an issue and they need to retry their login.
      3. I cache all the necessary information into a session struct variable. For example, I use the following in the Application.cfc

      public void function onSessionStart() {

      session.PresidingJudgeDraft.authenication.isAuthorized = false;

      session.PresidingJudgeDraft.LoginInfo = StructNew();
      session..LoginInfo.cn = ”;
      session..LoginInfo.dn = ”;

      return;
      }

Leave a comment