Last post Apr 03, 2014 06:24 AM by Nilzor
Feb 01, 2011 07:18 PM|kdkv|LINK
I need to authenticate users against Active Directory using email address.
Currently I use username (sAMAccountName) to authenticate against AD and is using default membership provider "System.Web.Security.ActiveDirectoryMembershipProvider".
I have configured the authentication using samaccountname by adding the following line in Web.config.
<add name="MembershipADProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="XX" connectionStringName="ADConnectionString" connectionUsername="abc"
As far as I understand the property 'attributeMapUsername' need to be mapped to 'sAMAccountName' or 'userPrincipalName'. I am not sure if authentication using email address can be done
using the deafult ActiveDirectoryMembershipProvider. Or do I need to write a custom membershipprovider to
achieve this ?
Let me know if anyone has done something similar.
Feb 23, 2013 04:28 AM|smirnov|LINK
Did you try
attributeMapUsername = "mail" ?
then user names must have the format UserName@DomainName; for example, email@example.com or firstname.lastname@example.org.
Apr 03, 2014 06:24 AM|Nilzor|LINK
Same issue here. Did you ever find a solution? Had to write own provider?