Can’t create My Site because user is ‘Enqueued’

Symptom

A user’s personal site (i.e. their My Site) cannot be created. Looking at the ULS logs under the Personal Site Instantiation category, the creation failed because it is already queued.

[Enque rejected] MySiteInstantiationWorkItemJobDefinition::AddWorkItem: Not queuing Interactive MySite instantiation for: 'EXAMPLEDOMAIN\username' since the user is already pending in the queue.

(event id: ajjuq)

Root Cause

The user’s PersonalSiteInstantiationState user profile object property has been set to Enqueued. When the My Site Instantiation timer jobs run they ignore creating the site because it is already in the queue.

You can verify the value of the property with the following PowerShell script:

$SiteUrl = "https:/example"
$Username = "EXAMPLEDOMAIN\username"

Add-PSSnapIn Microsoft.SharePoint.PowerShell
$Site = Get-SPSite $SiteUrl
$ServiceContext = Get-SPServiceContext $Site
$UserProfileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)
$UserProfile = $upm.GetUserProfile($UserName)
$UserProfile.PersonalSiteInstantiationState

The script will return the value of PersonalSiteInstantiationState. It will be set to Enqueued. For reference, see the MSDN for all possible values of the PersonalSiteInstantiationState enum

Resolution

Force the creation of the personal site using the CreatePersonalSite() method. https://msdn.microsoft.com/en-us/library/jj163964.aspx

$SiteUrl = "https:/example"
$Username = "EXAMPLE\username"

Add-PSSnapIn Microsoft.SharePoint.PowerShell
$Site = Get-SPSite $SiteUrl
$ServiceContext = Get-SPServiceContext $Site
$UserProfileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)
$UserProfile = $upm.GetUserProfile($UserName)
$UserProfile.CreatePersonalSite()
Share Button