Replies: 1 comment
-
This works. Pass the groupname as -User flag instead of -Group. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One of our goals is to assign MS Teams members and members of Azure AD Security Groups to file and folder permissions in SharePoint using Powershell. MS Teams and Azure AD Groups can be added using the UI.
Currently, this does not seem to be working for me. This example using a SharePoint Group works:
Set-PnPFolderPermission -List "$library" -Group "Files Visitors" -AddRole "Edit" -Identity "$library/$folder"
But these examples using a MS Team and an Azure AD Group (respectively) do not:
Both the Team in question and the Azure AD Group in question exist and the variables resolve to the correct names. Both the Team and the Azure AD Group can be added and given permissions in the UI. Attempting to add via the example commands above gives an error. Example error:
I take it only SharePoint Groups are allowed and MS Team and Azure AD Group permissions must be added manually? If there is a good way to accomplish this within a script, I would be pleased to have any hints :)
We have tried with various combinations of $group.ObjectID, etc. to no avail. I appreciate the responses!
Originally posted by @wil16098 in #2889
Beta Was this translation helpful? Give feedback.
All reactions