Recently we have detected an issue coming from Microsoft related to the default values configured at library level, basically the code is failing when calling the SharePoint API to apply those settings.
We have identified that all the tenants with this version are not having the issue 220.127.116.1115, but clients with lower versions could be impacted, for instance with this version 18.104.22.1680.
How can you check the version of your tenant?
There is an easy way to check it, you just need to put this url in the browser with your root site collection url followed by _vti_pvt/service.cnf
This will display results like this
The version needs to be communicated to your CSA or Implementation Consultant.
Raise a Microsoft ticket
Next step is to raise a Microsoft ticket. For that we would need to prove with code that SharePoint is failing trying to apply default values to the columns.
For this, we suggest to prove it with PowerShell in a call with Microsoft support.
The error after executing it must be "Attempted to perform an unauthorized operation"
Connect-PnPOnline -Url "ADD THE SITE SITE COLLECTION URL THAT FAILED" -Interactive
$ctx = Get-PnPContext
$web = Get-PnPWeb
$srcList = $web.Lists.GetByTitle("Documents")
$eventReceivers = $srcList.EventReceivers
$eventReceiverCreationInformation = New-Object Microsoft.SharePoint.Client.EventReceiverDefinitionCreationInformation
$eventReceiverCreationInformation.ReceiverName = "LocationBasedMetadataDefaultsReceiver ItemAdded"
$eventReceiverCreationInformation.SequenceNumber = 1000
$eventReceiverCreationInformation.ReceiverClass = "Microsoft.Office.DocumentManagement.LocationBasedMetadataDefaultsReceiver"
$eventReceiverCreationInformation.ReceiverAssembly = "Microsoft.Office.DocumentManagement, Version=22.214.171.124, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
$eventReceiverCreationInformation.EventType = [Microsoft.SharePoint.Client.EventReceiverType]::ItemAdded
$eventReceiverCreationInformation.Synchronization = [Microsoft.SharePoint.Client.EventReceiverSynchronization]::Synchronous
$receiver = $eventReceivers.Add($eventReceiverCreationInformation)
Links related to the issue that could be relevant to share with Microsoft
Site Provisioning fails when trying to add event receiver 'LocationBasedMetadataDefaultsReceiver' to a list · Issue #838 · pnp/pnpframework · GitHub
[BUG] Set-PnPDefaultColumnValues throws ServerUnauthorizedAccessException since last week · Issue #2814 · pnp/powershell · GitHub
Please sign in to leave a comment.