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.Hide Copy Code
<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" />