SharePoint Tidbit - SiteMaster and provisioning MySites in SP2016
Recently working with a customer as we build out the SharePoint 2016 farm we hit an issue creating My Sites and I had a hard time finding the answers, so thought i should put the resolution out here in case anybody else hits it.
Errors in ULS logs:
SharePoint Server My Site Provisioning 8100 Critical Mysite provisioning failed for user:[i:0#.w|domain\user] with correlationid:[1ad11a9e-db77-205e-5d0e-901da8d78446] on retry attempt: on queue type:[e94a6caa-b0f5-4897-b489-585ca50c7803]. Error:[Microsoft.Office.Server.UserProfiles.PersonalSiteCreateException: A failure was encountered while attempting to create the site. ---> Microsoft.SharePoint.SPException: User cannot be found.
MySiteSyncProvisioningManager:CanStartMySiteCreation ExpectedFailure: NoSiteMaster
Error in resolving user. User: 'domain\user', ResolverInformation: 'SPActiveDirectoryPrincipalResolver, DomainName: 'FQDN', DomainIsForest: 'False', DomainLoginName: '', CustomSearchQuery: '', CustomSearchFilter: '(&(objectCategory=Person)(objectClass=User)(!(userAccountControl:1.2.840.113522.214.171.1243:=2))(|(employeeID=*)(employeeNumber=*))(|(extensionAttribute12=*)(mail=*)(proxyAddresses=*)))', Timeout: '00:00:30', IncludeDistributionList: 'True''
So what did I do...
- Turned off Fast Site Collection creation by running this command
Disable-SPWebTemplateForSiteMaster -Template SPSPERS#10
- Created a MySite but it took a long time (Approx 5 mins)
- Realized that to use Fast Site Collection we need to use PeoplePicker to resolve the Farm account and the filter we had applied on the peoplepicker was removing it. Ran the command
stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv " <LDAP Query> " -url "http://mysite"
NOTE: You will need to figure out what filter works for you and it must include your Farm account (I set it to include all service accounts...future proofing).
- Turned on Fast Site Collection creation by running this command
Enable-SPWebTemplateForSiteMaster -Template SPSPERS#10 -CompabilityLevel 15
- Created a MySite and it was performed in less then 30 seconds
While the customer needed to control the query that the peoplepicker used, you have to make sure that MySite creation process can still resolve the farm account to be able to use the Fast Site Collection feature which is turned on by default and is very important for performance.
P.S. If you do have to mess with the Site Master template then also make sure that you have enabled for each content database in the MySite Web Application by running this command
New-SPSiteMaster -ContentDatabase "MySitesDB003" -Template SPSPERS#10