Sharing Folder in SharePoint library with an Office 365 Group?

%3CLINGO-SUB%20id%3D%22lingo-sub-391246%22%20slang%3D%22en-US%22%3ESharing%20Folder%20in%20SharePoint%20library%20with%20an%20Office%20365%20Group%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-391246%22%20slang%3D%22en-US%22%3E%3CP%3EWhat%20I%20need%20to%20do%20seems%20simple%20enough%2C%20but%20I%20cannot%20find%20the%20appropriate%20cmdlet%20and%20syntax%20to%20do%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20Document%20Library%20in%20a%20SharePoint%20Team%20Site%20(NOT%26nbsp%3B%20group-connected%2C%20but%20I%20don't%20think%20that%20matters).%20In%20that%20library%2C%20there%20are%20~35%20folders.%20These%20folders%20correspond%20to%20~35%20Office%20365%20Groups%20(technically%20%22Teams%22%2C%20but%20each%20is%20still%20a%20unified-group%20under%20the%20hood).%20I%20want%20to%20'share'%20(read-only)%20each%20of%20those%20folders%20with%20the%20corresponding%20unified-group.%20So%2C%20in%20natural%20language%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EShare%20-Folder%20'College%20of%20Engineering'%20-unified-group%20'CollegeOfEngineering%40%3CTENANT%3E.onmicrosoft.com'%20-Access%20'Read%22%3C%2FTENANT%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20explored%20the%20Set-PnPListItemPermissions%2C%20but%20it%20doesn't%20seem%20to%20allow%20the%20specification%20of%20a%20folder%20to%20share%2C%20nor%20does%20it%20allow%20the%20shared-to%20party%20to%20be%20an%20O365%20Group%20(there%20is%20a%20-Group%20parameter%2C%20but%20it%20refers%20to%20a%20SharePoint%20group%20object).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20any%20case%2C%20I%20could%20chug%20through%20this%20process%20manually%20in%20probably%20an%20hour%2C%20but%20would%20likely%20slip%20up%20at%20some%20point%20and%20give%20edit%20permissions%20instead%20of%20read%2Fview.%20Also%2C%20as%20we're%20in%20the%20process%20of%20migrate%20a%20couple%20hundred%20SP2010%20sites%2C%20many%20of%20which%20have%20similar%20permissions%20needs%2C%20figuring%20this%20out%20now%20is%20going%20to%20save%20a%20lot%20of%20time%20down%20the%20road.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20already%20have%20a%20script%20that%20I'm%20using%20to%20create%20those%20~35%20folders%2C%20so%20if%20there%20would%20be%20a%20way%20to%20set%20the%20permissions%20when%20the%20folder%20is%20created%2C%20that%20would%20be%20ideal.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-391246%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1157543%22%20slang%3D%22en-US%22%3ERe%3A%20Sharing%20Folder%20in%20SharePoint%20library%20with%20an%20Office%20365%20Group%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1157543%22%20slang%3D%22en-US%22%3EHi%20Chad%2C%20I%20have%20a%20very%20similar%20problem.%20Have%20you%20found%20a%20solution%20by%20any%20chance%3F%20Thanks%2C%20Ivan.%3C%2FLINGO-BODY%3E
New Contributor

What I need to do seems simple enough, but I cannot find the appropriate cmdlet and syntax to do it.

 

I have a Document Library in a SharePoint Team Site (NOT  group-connected, but I don't think that matters). In that library, there are ~35 folders. These folders correspond to ~35 Office 365 Groups (technically "Teams", but each is still a unified-group under the hood). I want to 'share' (read-only) each of those folders with the corresponding unified-group. So, in natural language:

 

Share -Folder 'College of Engineering' -unified-group 'CollegeOfEngineering@<tenant>.onmicrosoft.com' -Access 'Read"

 

I've explored the Set-PnPListItemPermissions, but it doesn't seem to allow the specification of a folder to share, nor does it allow the shared-to party to be an O365 Group (there is a -Group parameter, but it refers to a SharePoint group object).

 

In any case, I could chug through this process manually in probably an hour, but would likely slip up at some point and give edit permissions instead of read/view. Also, as we're in the process of migrate a couple hundred SP2010 sites, many of which have similar permissions needs, figuring this out now is going to save a lot of time down the road. 

 

I already have a script that I'm using to create those ~35 folders, so if there would be a way to set the permissions when the folder is created, that would be ideal.

1 Reply
Highlighted
Hi Chad, I have a very similar problem. Have you found a solution by any chance? Thanks, Ivan.