onsdag den 12. marts 2014

SharePoint 2013 - What's up with deleted Active Directory users?

I decided to play around what actually happens in SharePoint 2013 when a user is deleted from AD and created again with same initials according to:

  • User profile
  • User search
  • Content 
First I created following user in AD
User log in name: test01
First name: first 
Last name: user

I then ran an incremental user profile import followed by an incremental search crawl.
The user is now searchable in people search:
I then upload a document to a team site and initials are displayed as expected.

Now to the "exiting part":
  1. Delete the user from AD
  2. Run a profile import
  3. Run an incremental search crawl (user profile content source)
After following steps above the user is not searchable in the profile search and is not present in user profiles. The uploaded document is still shown with profile information (saved in the hidden users information list) 

Next test:
  1. Add user to Active directory with same log in name but different -first and -last name
  2. Run profile import
  3. Run an incremental search crawl 
The new user is now searchable in the people search:





When I add a document with the new user the the two documents are shown with expected initials:






Conclusion:
I haven't experienced any challenges in deleting users, and even adding new users with same account name as deleted users. SharePoint fully supports this approach.

Update:
I tested what happens with my sites. When a new user enters sky drive pro they will be redirected to the first users my site (site collection). The user do not have access uploading content or seeing the first users private content. The optimal solution would properly be SharePoint creating a new site collection for new users with a separate URL.

So if you find your self deleting users from AD be aware of this twist. Work around could be always to delete the site collection for a specific user when deleting the account from AD.