Active Directory User Data Storage

为君一笑 提交于 2019-12-13 21:15:58

问题


What is the best method using MVC4 to store user data for users authenticated with Active Directory? Should I use SID as the user id? For example:

CREATE TABLE MyStuff AS
{
   ID INT IDENTITY (1,1) NOT NULL UNIQUE,
   AccountDomainSid VARCHAR(50),
   Stuff VARCHAR(100)
 }

回答1:


The SID of a user can change (e.g. if you merge two domains). That's why there's a SIDHistory attribute on your AD objects, too :-)

See this TechNet blurb on SID vs. GUID.

The one thing that will always remain the same is the objectGUID from Active Directory - fixed for life.



来源:https://stackoverflow.com/questions/13144919/active-directory-user-data-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!