Set-PnPDefaultColumnValues fails, UnauthorizedAccessException
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint CSOM
Developer environment
Windows
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [ ] 💥 Microsoft Edge
- [ ] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [X] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
- PnP PowerShell 1.12.0
Describe the bug / error
UnauthorizedAccessException when setting default column values in a document library using PnP PowerShell
"SchemaVersion":"15.0.0.0"," LibraryVersion":"16.0.23415.12003"," ErrorInfo":{ "ErrorMessage":"Attempted to perform an unauthorized operation.", "ErrorValue":null,"TraceCorrelationId":"784d9aa0-9052-6000-4901-69d4c7965d70", "ErrorCode":-2147024891,"ErrorTypeName":"System.UnauthorizedAccessException" }, "TraceCorrelationId":"784d9aa0-9052-6000-4901-69d4c7965d70"
Other topics about this issue: https://github.com/pnp/pnpframework/issues/838 https://github.com/pnp/powershell/issues/2814
Steps to reproduce
Reproduction from powershell with:
Connect-PnPOnline -Url https://[tenant].sharepoint.com/
Set-PnPDefaultColumnValues -List "Data" -Field "Test" -Value "Test"
Assuming there is a doclib "Data" on the root site collections with a column "Test".
Expected behavior
Not getting an error
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
We're experiencing the same issue in our production tenant since Thurs NZST on code that hasn't changed for some time. Same code works fine in our seperate dev tenant. We're in the AU Australia East region
Same issue in a UK tenancy since 24th Feb - code has been running without issue for three months. Other tenancies unaffected.
The issue has been reported on 7 tenants of our EU customers since yesterday. No reports on USA tenants by now.
It seems that the issue has been resolved overnight. I have no reproduction anymore on the 8 affected tenants.
@Gunther1972 - closing the issue as it seems to be auto-resolved
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues