What Active Directory field do I use to uniquely identify a user?

后端 未结 4 1176
梦谈多话
梦谈多话 2020-12-30 03:05

I have an Asp.net MVC project authenticating through AD. I would like to store audit information in tables for the current logged in user. What should I be storing in the da

4条回答
  •  离开以前
    2020-12-30 03:54

    samAccountName is the user name the user uses to log in with. You can get a little more 'complete' by prepending the domain too, but there's no reason not to use the obvious username field.

提交回复
热议问题