SharePoint mysite is deleted

Issue:


The My Site of Joe Blow is scheduled for deletion. As their manager you are now the temporary owner of their site. This temporary ownership gives you access to the site to copy any business-related information you might need. To access the site use this URL: http://servername/mysite/personal/joeblow.

Cause:

In SharePoint under Central Administration there is a ‘My Site Cleanup Job’ which runs every hour. When a user is deleted or disable in Active Directory, the My Site Cleanup job starts a workflow on that user’s My Site. The default behaviour is to send an e-mail message to the manager with a link to the deleted user’s site. The e-mail message contains a request to the manager to move any documents or data that the manager wants to preserve, because the site might be deleted in the future.

MySite clean up job screen

MySite clean up job screen

There is also ‘site use confirmation and deletion’ page under central administration operations which may be checked.

Site use confirmation deletion screen

Site use confirmation deletion screen

Solution:

To mitigate this issue I think you can apply any of the following steps.

1. If you have two domain controllers use the domain name and ‘Auto discover domain controller’ option. If the one domain controller goes down SharePoint will look for the other domain controller. Please look at my aricle on ‘Employee Lookup or User Profile searches in SharePoint 2007‘ to find a filter for not importing disable Active Directory accounts.

AD connection auto discovery

AD connection auto discovery screen

2. In central administration we can disable ‘My Site Cleanup Job’ and run once a week manually to do cleanup. Not a great options.

3. Potentially you can also call the SharePoint profile stored procedure manually. If you do this you may want to disable ‘My Site Cleanup Job’.

DECLARE @UserID uniqueidentifier
DECLARE @NTName nvarchar(400)
DECLARE @SID varbinary(512)

DECLARE userCursor CURSOR FOR
SELECT Userid, NTName, SID from userprofile _full where bdeleted = 1

OPEN userCursor

FETCH NEXT FROM userCursor INTO @UserID, @NTName, @SID

WHILE @@FETCH_STATUS = 0

BEGIN

EXEC profile_RemoveUser @UserID, @NTName, @SID

FETCH NEXT FROM userCursor INTO @UserID, @NTName, @SID

END

CLOSE userCursor
DEALLOCATE userCursor

References:

SharePoint profile stored procedure article

SharePoint Profile Cleanup

White paper on mysite

How To Delete Sharepoint Timer Job Definition

Advertisement

About Diganta Kumar
Diganta Kumar has years of experience in architecting and development of .NET systems to meet complex business needs. Specialized in Intranet and Internet projects. Strong knowledge of Enterprise Content Management (ECM) Systems like Microsoft SharePoint and Elcom Community Manager.NET. I have developed, designed, implemented and configured Legal Aid NSW and Bankstown City Council NSW Intranets.

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 116 other followers