title: Unable to connect to ldap using python ldap3 module
body: <p>I am using Online LDAP Test Server(<a href="https://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/" rel="nofollow noreferrer">https://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/</a>)</p>
  
  <p>I am trying to connect to it using python ldap3 module.</p>
  
  <p>This is my code:</p>
  
  <pre><code>import ldap3
  user = 'riemann'
  password = 'password'
  server = ldap3.Server('ldap.forumsys.com', port=389)
  connection = ldap3.Connection(server, user=user, password=password)
  connection.bind()
  conn = connection.search(search_base='ou=mathematicians,dc=example,dc=com', search_filter='(&amp;(objectClass=user)(userPrincipalName='+user+'))', attributes='*')
  
  print conn
  </code></pre>
  
  <p>When I check the conn it is <strong>False</strong>.</p>
  
  <p>Can someone help me in getting the connection
  Thanks in advance</p>