Sharepoint 2010 Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint 2010       RSS Feeds

AD Account and SPUser issue

  Date: Nov 01    Category: Sharepoint 2010    Views: 1059

I need help very badly. I have faced an issue twice now, but unable to
understand what's going wrong. I have a SharePoint (2010) custom list,
which has a User Column (Person or Group) type. I have some users added
into this list. After some days, one of the users, which was in AD, was
deleted and re-added with the same details (user name, password and all the
other details). This user happened to be present in my custom list too. I
have a custom piece of code to query users from this list, based on the
above mentioned User Column. After the deletion and addition of the user in
AD (who was also in this list), when I was querying for that particular
user, using the following line,


it returned null. I was shocked. To check this, I went to the list, opened
that particular list item, edited it, by clicking on the "Check Name"
button near the People Picker (User Column), which could still resolve the
user and clicked on Save for that list item. After this, the above line of
code started working. Same was the result of deleting that list item and
re-adding it to the list.

I don't have User Profiles synced from AD and I cannot and need not have
this. So, can anyone please let me know, what's going wrong here? What made
this user (in my list) corrupt, when the same user was deleted and re-added
in AD with all the same details? Any help would be greatly appreciated. I
googled, but couldn't find much details. Any links to better understand
this will also help.



3 Answers Found

Answer #1    Answered On: Nov 01    

You need to understand that each item in AD is a unique and different
object. As far as the system is concerned, objects are identified by the
GUID of the object, a globally unique identifier. When you delete an item,
that item is gone. When you re-create the object, although the properties
may be the same, it has a new GUID and is therefore, a new item.

Answer #2    Answered On: Nov 01    

User names are like hostnames, they only exist to make for humans to read.

Answer #3    Answered On: Nov 01    

All true. The only point I would make is that when dealing with Users and
Groups the GUID involved is actually the Security Identifier (SID). When
you delete and recreate the user a new SID is established for the new user.
That SID is how SharePoint tracks users. So the user in the list is still
pointing at the old SID rather than then new one. It displays the userId,
but it identifies the user by SID.

Didn't find what you were looking for? Find more on AD Account and SPUser issue Or get search suggestion and latest updates.