How to set UserPrincipalName attribute
when default provider is AspNetActiveDirectoryMembershipProvider.
Following is the list of CreateUser methods of System.Web.Security.Membership
public static MembershipUser CreateUser(string username, string password);
public static MembershipUser CreateUser(string username, string password, string email);
public static MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, out MembershipCreateStatus status);
public static MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
According to the ActiveDirectoryMembershipProvider MSDN documentation, the
UserNameproperty are mapped to theuserPrincipalNameattribute.