Answers.Body: <p>There's a feature request <a href="https://github.com/craftcms/cms/issues/1471" rel="nofollow noreferrer">here</a> that would allow custom login forms for the Craft Control Panel login page you might want to add a comment to.</p>
  
  <p>In the meantime, there is a <a href="https://craftcms.com/docs/plugins/events-reference#userSession-onBeforeAuthenticate" rel="nofollow noreferrer"><code>userSession.onBeforeAuthenticate</code></a> event a plugin can listen to to perform any 3rd party authentication.</p>
  
  <p>You can see how a similar plugin did this for front-end LDAP logins here: 
   <a href="https://github.com/thepitagroup/adldap_craftcms" rel="nofollow noreferrer">https://github.com/thepitagroup/adldap_craftcms</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-21T16:57:56.293Z
Answers.Text: Thanks for the help. I got LDAP working. would you help how to set the user session  and permissions? I do not want to save to craft user table.
Answers.UserDisplayName: youme
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T22:20:15.720Z
Answers.Text: @youme Can you link to how you got LDAP working?
Answers.UserDisplayName: JMP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-16T00:03:52.960Z
Answers.LastActivityDate: 2018-02-16T00:03:52.960Z
Answers.UserDisplayName: Brad Bell
Body: <p>Where only users in Active Directory can login to the Craft Control Panel.</p>
  
Tags: <authentication>
Title: How to use LDAP for authentication in Craft CP (back end)
ThreadText: # How to use LDAP for authentication in Craft CP (back end)
  
  (Asked by: username_0 on 2018-02-15)
  
  Where only users in Active Directory can login to the Craft Control Panel.
  
  **Tags:** authentication
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-02-16. Score: 3
  
  There's a feature request [here](https://github.com/craftcms/cms/issues/1471) that would allow custom login forms for the Craft Control Panel login page you might want to add a comment to.
  
  In the meantime, there is a [`userSession.onBeforeAuthenticate`](https://craftcms.com/docs/plugins/events-reference#userSession-onBeforeAuthenticate) event a plugin can listen to to perform any 3rd party authentication.
  
  You can see how a similar plugin did this for front-end LDAP logins here:
  <https://github.com/thepitagroup/adldap_craftcms>
  
  > **Comments:**
  > **username_0**: Thanks for the help. I got LDAP working. would you help how to set the user session  and permissions? I do not want to save to craft user table.  
  > **username_2**: @username_0 Can you link to how you got LDAP working?  
  
  ---
  
  