I’m developing an intranet site project (ASP.NET MVC project).
How do I associate a user in a domain to its account (UserAccount entity):
public class UserAccount {
// normally inherited from an abstract entity
public Guid Id { get; set; }
public String FullName { get; set; }
public String Password { get; set; }
public Guid EmployeeId { get; set; }
}
Thanks!
If you are asking about how to query Active Directory to fetch a domain user details and populate the UserAccount class, you could use the following:
But of course there’s already an ActiveDirectoryMembershipProvider that you could use if you are working with Windows Authentication.