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

后端 未结 4 1188
梦谈多话
梦谈多话 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 04:04

    You might want to use the SID -- that's what the OS itself uses in most cases. SIDs are also unique across domains or workgroups.

    The problem with user name alone is that it can be changed, whereas the SID is fixed.

提交回复
热议问题