Forum Discussion
SharePoint MySite and ADFS
We are facing an issue with creating MySites for our customers.
We are hosting a SharePoint 2016 environment for multiple customers. We are using SharePoint with ADFS. Our customers also have an ADFS infrastructure up and running and the ADFS Federated Trusts are in configured.
They can access the SharePoint Site, but if they try to get to their My Sites, they getting an error:
"We were unable to create your website ..."
In the eventlog and the ULS logs I can see the following error:
My Site creation failure for user 'i:05.t|blue adfs|don.test@rsm-verhuelsdonk.de' for site url 'https://my.onbluearea.net/personal/don_test_rsm-verhuelsdonk_de1'. The exception was: Microsoft.Office.Server.UserProfiles.PersonalSiteCreateException: A failure was encountered while attempting to create the site. ---> Microsoft.SharePoint.SPException: User cannot be found.
The User Profile was created in the User Profile Manager and the Account Name is matching the above value ...
If I create the My Site with the following PowerShell script:
$tokenIssuer = Get-SPTrustedIdentityTokenIssuer -Identity "Blue ADFS"
$claimsPrincipal = New-SPClaimsPrincipal -TrustedIdentityTokenIssuer $tokenIssuer -Identity "don.test@rsm-verhuelsdonk.de"
#Get MySite Host
$mysiteHostUrl = "https://my.onbluearea.net/"
$mysite = Get-SPSite $mysiteHostUrl
#Build User Site URL
$userSiteURL = $mysiteHostUrl + "personal/don_test_rsm-verhuelsdonk_de"
$userSiteURL
#Get MySite Site Defintion
$wa = Get-SPWebApplication -Identity $mysiteHostUrl
#Create User Personal Site
New-SPSite -Name "Personal Site - Don Test" -Url $userSiteURL -OwnerAlias $claimsPrincipal -Template "SPSPERS#10" -HostHeaderWebApplication $wa -Language 1031 -ContentDatabase 'SharePoint_MySite_01'
it will work, but how can I make SharePoint recognize this as the My Site of this user....