Vikee Kumar

Vikee Kumar

  • NA
  • 31
  • 430

Form based authentication using emailid and domain name

Apr 18 2020 1:19 PM
We are implementing Form based authentication using Ldap membership. We are trying to allow user to login with mail id as well as domain name.

Currently we are setting either mail or sAMAccountName in user attribute in web.config.

Could you please help to keep both mail as well as sAMAccountName together in web.config file?
 
 
 
I tried using sAMAccountName in userNameAttribute in below code in web.config file of SharePoint application.It is working fine with domain name.

Then I tried using mail in userNameAttribute in below code in web.config file of SharePoint application.It is working fine with email address.

we want both to be worked in one go.

<add name="LdapMember" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=16.0.0.0, Culture=neutral, PublicKeyToken=*******" server="*****" port="389" useSSL="false" userDNAttribute="distinguishedName" userNameAttribute="sAMAccountName" userContainer="DC=***,DC=*****" userObjectClass="person" userFilter="(ObjectClass=person)" scope="Subtree" otherRequiredUserAttributes="sn,givenname,cn" />