Thursday, May 10, 2012

User Profile Import and My Site Deletion

What Profile Import does when an user account Deleted in AD?
When an user account deleted/disabled in Active directory (or any other account store where SharePoint gets the profiles) SharePoint profile import makes the missing profile as "Marked for deletion" in the Profile database.

In fact Profile import makes the profiles in profile database as "Marked for deletion" based on User Profile filters applied. (If you change the filter, it will take effect on the next profile import). By default it will be:

 Which instruct profile import: only get the user objects

 You can make it:
(&(objectCategory=person)(objectClass=user)( !(userAccountControl:1.2.840.113556.1.4.803:=2)))
Which instruct profile import: only get the user objects and omit disabled ones.

Refer my post: Filters in SharePoint User Profile Synchronization Connections for other supported user profile filters.

My Site Cleanup Job:
The timer Job "My Site Cleanup Job" Which Runs hourly, looks for all users marked for deletion during profile import (Incremental or Full which doesn't matters) and deletes their profiles from the profile database. It also assigned ownership to the deleted profile’s manager(if available) and an email is sent to the manager.

When the My site cleanup job deletes the user profile, it also deletes all profile specific data including any user Quick Links, Colleague Tracker, Profile Picture, etc. (But the users documents in My site will be in safe)

When My site will be deleted?
Although it sounds like "My Site Cleanup Job" it doesn't actually deletes my sites. It only removes the user profile from the profile store and changes the my site owner to the user’s manager if there is one.  My Site will only be deleted if the Automatic Site Deletion is enabled. If you want to enforce the Automatic deletion of my sites you can use "Site Use Confirmation and Deletion”
(Central Administration > Application Management > Site Use Confirmation and Deletion)

If an user profile is missing during profile import, and if you try to get into My Site's URL by:\user – SharePoint will display "user not found" error message.
SharePoint user not found error
which is obvious! Change the secondary owner if you want to access the user's My site.

As the user is not found, You can't change the secondary owner from central Admin web interface. Use stsadm: E.g.
stsadm -o siteowner -url -secondarylogin global\salaudeen"

More info:

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:


  1. This is not true. My Site Clean up job deletes the my site and it does not have to do anything with Site Use confirmation and deletion.So if my site clean up job is running and it cleans any user profile and user profile is associated with any my site then my iste will be queued for deletion in 14 days and it will get delete after 14 days. Tis deletion is not a soft deletion bt it actually removes my site permanently from system

    1. Katr,
      The above case is from MOSS 2007, and I'm 100% sure.

  2. Also this I talked about sharepoint 2010. I am not aware if this is different in 2007


Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...