sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Set-PnPDefaultColumnValues fails, UnauthorizedAccessException

Open Gunther1972 opened this issue 3 years ago • 7 comments

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

Gunther1972 avatar Feb 27 '23 15:02 Gunther1972

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Feb 27 '23 15:02 ghost

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

andygjones-nz avatar Feb 28 '23 01:02 andygjones-nz

Same issue in a UK tenancy since 24th Feb - code has been running without issue for three months. Other tenancies unaffected.

jrjlee avatar Feb 28 '23 10:02 jrjlee

The issue has been reported on 7 tenants of our EU customers since yesterday. No reports on USA tenants by now.

Gunther1972 avatar Feb 28 '23 12:02 Gunther1972

It seems that the issue has been resolved overnight. I have no reproduction anymore on the 8 affected tenants.

Gunther1972 avatar Mar 01 '23 11:03 Gunther1972

@Gunther1972 - closing the issue as it seems to be auto-resolved

AJIXuMuK avatar Mar 01 '23 15:03 AJIXuMuK

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

ghost avatar Mar 08 '23 18:03 ghost