SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 994 forks source link

Set-PnPFolderPermission now fails on General Folder #7630

Open gleszczak opened 2 years ago

gleszczak commented 2 years ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

not applicable

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

I have been using the following code to edit root level permissions for Sharepoint sites (Created by Teams) for a year.

Set-PnPFolderPermission -List "Shared Documents" -Identity "Shared Documents/General" -User Proj-OM -AddRole "Read"

Suddenly a couple months ago the command fails when executing on the "Shared Documents/General" folder and produces the following error:

Set-PnPFolderPermission : To update this folder, go to the channel in Microsoft Teams At line:1 char:1

It still works properly on all of the other subfolders. Also, I can set the permissions using the Sharepoint GUI with no problem for the "Shared Documents/General" folder. Microsoft didn't have any answers and because it's powershell they said they couldn't officially support me.

Desperately need this to work again, it's causing me lots of unnecessary manual work.

Steps to reproduce

  1. Have a sharepoint site created by teams. Have a security group named "Proj-OM"
  2. Authenticate to the SharePoint site
  3. Execute: Set-PnPFolderPermission -List "Shared Documents" -Identity "Shared Documents/General/Operations" -User Proj-OM -AddRole "Read"

Expected behavior

It simply executed the command and set the permission for the folder. This worked this way for just under a year.

ghost commented 2 years ago

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