Adding Security groups in SharePoint and Office 365 groups

%3CLINGO-SUB%20id%3D%22lingo-sub-123246%22%20slang%3D%22en-US%22%3EAdding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123246%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20all!%3C%2FP%3E%3CP%3EWe%20have%20several%20sites%20I%20have%20created%20for%20departments%20as%20Modern%20Team%20Sites%20connected%20to%20Groups%20(we%20are%20in%20SharePoint%20Online).%20I%20want%20to%20be%20able%20to%20utilize%20AD%20security%20groups%20for%20permssions%20to%20the%20Modern%20Team%20Sites%20connected%20to%20Groups.%20I%20can%20only%20add%20them%20from%20%22Advanced%20Permissions%22%20into%20the%20main%203%20sharepoint%20groups%20(Owners%2C%20Members%2C%20Visitors)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20when%20folks%20from%20that%20AD%20group%20goes%20to%20said%20Modern%20Team%20Sites%20connected%20to%20Groups%2C%20it%20says%20they%20do%20not%20have%20permission%20to%20view.%20Do%20Modern%20Team%20Sites%20connected%20to%20Groups%20only%20accept%20adding%20indiviuals%20as%20users%3F%20when%20I%20do%20that%20everything%20works%20correctly%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-123246%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-389312%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-389312%22%20slang%3D%22en-US%22%3E%3CP%3EHad%20the%20same%20trouble%20-%20but%20found%20solution%20for%20Adding%20Local%20AD%20Security%20Groups%20to%20SharePoint%20Online%20Groups%20-%20Synced%20to%20Azure%20AD%20via%20Azure%20AD%20Connect%20to%20ur%20O365%20tenant%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3EConnect-PnPOnline%20%E2%80%93Url%20%3CA%20href%3D%22https%3A%2F%2Fsite.sharepoint.com%2Fsites%2FYourSite%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsite.sharepoint.com%2Fsites%2FYourSite%3C%2FA%3E%20%E2%80%93Credentials%20%24cred%3CBR%20%2F%3EAdd-PnPUserToGroup%20-LoginName%20Local_AD_Security-Group%20-Identity%20'YourSite%20Members'%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3E__________%3C%2FP%3E%3CP%3EShould%20remember%20that%20the%20Site%20Group%20associated%20with%20your%20Share%20Point%20site%20i.e.%20The%20Office%20365%20group%20-%20cannot%20currently%20have%20a%20Security%20Group%20of%20users%20from%20a%20Local%20AD%20Group%20added%20to%20it%20-%20HOWEVER%20there%20are%20Scripts%20available%20to%20Sync%20the%20users%20from%20an%20Local%20AD%20Group%20to%20an%20Office%20365%20Group.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20will%20want%20users%20in%20the%20Office%20365%20Group%20as%20well%20so%20that%20they%20can%20be%20affiliated%20with%20your%20Microsoft%20Teams%20Team%20and%20Channels%20(If%20you%20use%20Microsoft%20Teams%20that%20is)%3C%2FP%3E%3CP%3E_________%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps%20someone.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123697%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123697%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F38921%22%20target%3D%22_blank%22%3E%40Douglas%20Clelland%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Efor%20SPO%20site%20I%20can%20confirm%20that%20I%20tried%20it%20and%20users%20can%20access%20and%20view%20pages%20when%20AD%20Security%20groups%20are%20nested%20inside%20SPO%20standard%20groups.%20If%20I%20remember%2C%20it%20is%20also%20possible%20to%20check%20if%20the%20permissions%20are%20working%20with%20the%20check%20button%20in%20the%20advanced%20UI.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMarco%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123539%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123539%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F38921%22%20target%3D%22_blank%22%3E%40Douglas%20Clelland%3C%2FA%3E%3C%2FP%3E%3CP%3EHave%20you%20tried%20to%20add%20the%20security%20group%20%3CSTRONG%3Eout%3C%2FSTRONG%3E%20of%20the%20%22standard%22%20groups%20(i.e.%20Owners%2C%20Members%2C%20and%20Visitors)%3F%3C%2FP%3E%3CP%3EIn%20my%20experience%2C%20tweaking%20the%20%22standard%22%20groups%20by%20the%20%22Advanced%20Permissions%22%20UI%20doesn't%20work...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123327%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123327%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F20480%22%20target%3D%22_blank%22%3E%40Marco%20Mangiante%3C%2FA%3E%2C%3C%2FP%3E%3CP%3Eyes%20correct%20Create%20an%20Office%20365%20Group%2FSharePoint%20site%2C%20add%20AD%20Security%20Group%20like%20%22Public%20Works%20Department%22%20and%20they%20can%20then%20access%20all%20the%20sharepoint%20and%20O365%20group%20features%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123326%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123326%22%20slang%3D%22en-US%22%3E%3CP%3ESo%2C%20to%20clarify%3A%20I%20create%20an%20O365%20Group%20that%2C%20when%20created%2C%20has%20a%20SPO%20bound%3B%20after%20this%2C%20I%20want%20to%20use%20AD%20Security%20Groups%20to%20make%20user%20access%20the%20SPO%20pages%20of%20the%20O365%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123312%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123312%22%20slang%3D%22en-US%22%3ECorrect%2C%20but%20the%20discussion%20is%20around%20adding%20nested%20Groups%20in%20the%20Group%2C%20not%20in%20the%20SPO%20Group%20site%20that%20can%20be%20managed%20independently%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123299%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123299%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F38921%22%20target%3D%22_blank%22%3E%40Douglas%20Clelland%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edo%20you%20mean%20something%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20title%3D%22Deploy%20an%20isolated%20SharePoint%20Online%20team%20site%22%20href%3D%22https%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Flibrary%2Fmt784693.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDeploy%20an%20isolated%20SharePoint%20Online%20team%20site%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123275%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123275%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%20I%20also%20see%20this%20post%20from%20earlier%20this%20year%2C%20where%20it%20says%20adding%20AD%20security%20groups%20to%20Officce%20365%20groups%20does%20not%20work.%3C%2FP%3E%3CP%3E%3CA%20title%3D%22How%20to%20manage%20O365%20Group%20membership%20through%20AD%20Security%20Groups%20and%2For%20nested%20O365%20Groups%22%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FOffice-365-Groups%2FHow-to-manage-O365-Group-membership-through-AD-Security-Groups%2Ftd-p%2F28366%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FOffice-365-Groups%2FHow-to-manage-O365-Group-membership-through-AD-Security-Groups%2Ftd-p%2F28366%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123258%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123258%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%20I%20figured%20as%20much.%20We%20have%20a%20couple%20of%20sites%20built%20on%20the%20classic%20page%20model%20and%20AD%20security%20groups%20works%20as%20intended%20there.%20But%20not%20sites%20built%20from%20the%20Modern%20model%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-123255%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-123255%22%20slang%3D%22en-US%22%3E%3CP%3EMmm...behind%20the%20scenes%20is%20still%20old%20SharePoint....but%20it's%20also%20true%20that%20Modern%20SPO%20Team%20sites%20are%20a%20little%20bit%20different%20compared%20to%20classic%20SPO%20sites.%20Adding%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F67%22%20target%3D%22_blank%22%3E%40Christophe%20Fiessinger%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1523142%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1523142%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F41521%22%20target%3D%22_blank%22%3E%40Adam%20Weldon-Ming%3C%2FA%3E%26nbsp%3BThis%20is%20pretty%20good%20but%20looks%20like%20I'd%20have%20to%20connect%20to%20each%20site%20one%20at%20a%20time.%26nbsp%3B%20My%20customer%20will%20have%20a%20couple%20hundred%20modern%20SPO%20M365%20Team%20Sites%20with%20Groups.%26nbsp%3B%20One%20for%20each%20of%20their%20clients.%26nbsp%3B%20I%20can%20get%20the%20internal%20users%20setup%20with%20no%20problem%20to%20access%20the%20SP%20resources%20using%20'Everyone%20Except%20External'.%26nbsp%3B%20Problem%20is%2C%20they%20can't%20get%20the%20Planner%20because%20they%20need%20to%20be%20site%20members.%26nbsp%3B%20OK%20so%20not%20a%20problem%2C%20just%20add%20the%20existing%20users%20as%20'site%20members'%20into%20the%20provisioning%20site%20template%20that%20I'm%20building.%26nbsp%3B%20But%20what%20about%20new%20hires%20moving%20forward%3F%26nbsp%3B%20I%20need%20an%20easy%20to%20use%20method%20for%20my%20customer%20to%20add%20their%20new%20hires%20into%20hundreds%20of%20existing%20groups.%26nbsp%3B%20I%20can't%20add%20a%20security%20group%2C%20as%20others%20mentioned%20in%20this%20thread%2C%20which%20would%20resolve%20this%20issue%20by%20simply%20adding%20the%20new%20hire%20to%20the%20security%20group.%26nbsp%3B%20Any%20thoughts%20on%20my%20situation%20and%20how%20to%20best%20manage%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1650702%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1650702%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F43188%22%20target%3D%22_blank%22%3E%40Scott%20Smith%3C%2FA%3E%26nbsp%3B%20did%20you%20ever%20get%20an%20answer%20to%20this%3F%26nbsp%3B%20I'm%20also%20about%20to%20run%20into%20a%20scalability%20problem%20where%20adding%20new%20users%20is%20concerned.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1652344%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Security%20groups%20in%20SharePoint%20and%20Office%20365%20groups%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1652344%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F787875%22%20target%3D%22_blank%22%3E%40trenish%3C%2FA%3E%26nbsp%3B-%20The%20site%20members%20won't%20carry%20over%20into%20my%20provisioning%20template%2C%20presumably%20since%20that%20is%20basically%20managed%20as%20a%20Group%20resource.%26nbsp%3B%20I%20understand%20that%20this%20can%20be%20achieved%20in%20a%20'tenant%20template'%20which%20I%20haven't%20yet%20mastered.%26nbsp%3B%20Or%20the%20preferred%20method%20of%20building%20an%20Azure%20Package%20which%20is%20a%20bit%20beyond%20my%20pay%20grade%20but%20also%20the%20client%20would%20require%20additional%20licensing.%20However%2C%20I've%20been%20able%20to%20craft%20two%20serviceable%20powershell%20methods.%26nbsp%3B%20One%20for%20my%20initial%20setup%20as%20I%20build%20sites%20and%20the%20other%20for%20future%20new%20hires%20to%20all%20existing%20sites%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20Add%20a%20list%20of%20employees%20as%20'Site%20Members'%20to%20a%20M365%20Group%3C%2FP%3E%3CP%3E2.%20Add%20a%20new%20hire%20to%20a%20list%20of%20M365%20Groups%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBoth%20processes%20worked%20for%20me.%26nbsp%3B%20They%20require%20exchange%20admin%20and%20a%20connect%20to%20exchange%20via%20powershell.%26nbsp%3B%20I%20believe%20you%20need%20a%20cmdlet%20installed%20first%20and%20local%20admin%20rights%20to%20the%20machine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EConnect-ExchangeOnline%20-UserPrincipalName%20you%40email.com%20-ShowProgress%20%24true%0A%0A%23Add%20multiple%20users%20to%20a%20single%20group.%20%20Replace%20path%20and%20file%20name%20for%20your%20CSV%20and%20the%20O365%20group%20name.%20%20CSV%20header%20should%20be%20a%20single%20column%20with%20a%20header%20of%20'Member'%20without%20quotes%0A%0AImport-CSV%20%22C%3A%5Cpath%5Cmembers.csv%22%20%7C%20ForEach-Object%20%7B%0AAdd-UnifiedGroupLinks%20%E2%80%93Identity%20%22O365GroupName%22%20%E2%80%93LinkType%20Members%20%20%E2%80%93Links%20%24_.member%0A%7D%0A%0A%23Add%20single%20users%20to%20list%20of%20groups.%20%20Replace%20path%20and%20file%20name%20of%20the%20TXT%20and%20the%20email%0A%0AForeach%20(%24group%20in%20(get-content%20%22c%3A%5Cpath%5Cgroups.txt%22))%7B%0A%20%20%20%20Add-UnifiedGroupLinks%20%24group%20%E2%80%93LinkType%20Member%20-Links%20%22newhire%40email.com%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello all!

We have several sites I have created for departments as Modern Team Sites connected to Groups (we are in SharePoint Online). I want to be able to utilize AD security groups for permssions to the Modern Team Sites connected to Groups. I can only add them from "Advanced Permissions" into the main 3 sharepoint groups (Owners, Members, Visitors)

 

But when folks from that AD group goes to said Modern Team Sites connected to Groups, it says they do not have permission to view. Do Modern Team Sites connected to Groups only accept adding indiviuals as users? when I do that everything works correctly

13 Replies
Highlighted

Mmm...behind the scenes is still old SharePoint....but it's also true that Modern SPO Team sites are a little bit different compared to classic SPO sites. Adding here @Christophe Fiessinger

Highlighted

Thank you @Juan Carlos González Martín I figured as much. We have a couple of sites built on the classic page model and AD security groups works as intended there. But not sites built from the Modern model

Highlighted

Hi @Juan Carlos González Martín I also see this post from earlier this year, where it says adding AD security groups to Officce 365 groups does not work.

https://techcommunity.microsoft.com/t5/Office-365-Groups/How-to-manage-O365-Group-membership-through...

Highlighted
Highlighted
Correct, but the discussion is around adding nested Groups in the Group, not in the SPO Group site that can be managed independently
Highlighted

So, to clarify: I create an O365 Group that, when created, has a SPO bound; after this, I want to use AD Security Groups to make user access the SPO pages of the O365?

Highlighted

Hello @Marco Mangiante,

yes correct Create an Office 365 Group/SharePoint site, add AD Security Group like "Public Works Department" and they can then access all the sharepoint and O365 group features

Highlighted

@Douglas Clelland

Have you tried to add the security group out of the "standard" groups (i.e. Owners, Members, and Visitors)?

In my experience, tweaking the "standard" groups by the "Advanced Permissions" UI doesn't work...

Highlighted

Hello @Douglas Clelland

 

for SPO site I can confirm that I tried it and users can access and view pages when AD Security groups are nested inside SPO standard groups. If I remember, it is also possible to check if the permissions are working with the check button in the advanced UI.

 

Marco

Highlighted

Had the same trouble - but found solution for Adding Local AD Security Groups to SharePoint Online Groups - Synced to Azure AD via Azure AD Connect to ur O365 tenant

 

Connect-PnPOnline –Url https://site.sharepoint.com/sites/YourSite –Credentials $cred
Add-PnPUserToGroup -LoginName Local_AD_Security-Group -Identity 'YourSite Members'

__________

Should remember that the Site Group associated with your Share Point site i.e. The Office 365 group - cannot currently have a Security Group of users from a Local AD Group added to it - HOWEVER there are Scripts available to Sync the users from an Local AD Group to an Office 365 Group.

 

You will want users in the Office 365 Group as well so that they can be affiliated with your Microsoft Teams Team and Channels (If you use Microsoft Teams that is)

_________

 

Hope this helps someone.

 

Cheers,

 

 

Highlighted

@Adam Weldon-Ming This is pretty good but looks like I'd have to connect to each site one at a time.  My customer will have a couple hundred modern SPO M365 Team Sites with Groups.  One for each of their clients.  I can get the internal users setup with no problem to access the SP resources using 'Everyone Except External'.  Problem is, they can't get the Planner because they need to be site members.  OK so not a problem, just add the existing users as 'site members' into the provisioning site template that I'm building.  But what about new hires moving forward?  I need an easy to use method for my customer to add their new hires into hundreds of existing groups.  I can't add a security group, as others mentioned in this thread, which would resolve this issue by simply adding the new hire to the security group.  Any thoughts on my situation and how to best manage this?

Highlighted

@Scott Smith  did you ever get an answer to this?  I'm also about to run into a scalability problem where adding new users is concerned.

Highlighted

@trenish - The site members won't carry over into my provisioning template, presumably since that is basically managed as a Group resource.  I understand that this can be achieved in a 'tenant template' which I haven't yet mastered.  Or the preferred method of building an Azure Package which is a bit beyond my pay grade but also the client would require additional licensing. However, I've been able to craft two serviceable powershell methods.  One for my initial setup as I build sites and the other for future new hires to all existing sites:

 

1. Add a list of employees as 'Site Members' to a M365 Group

2. Add a new hire to a list of M365 Groups

 

Both processes worked for me.  They require exchange admin and a connect to exchange via powershell.  I believe you need a cmdlet installed first and local admin rights to the machine.

 

 

Connect-ExchangeOnline -UserPrincipalName you@email.com -ShowProgress $true

#Add multiple users to a single group.  Replace path and file name for your CSV and the O365 group name.  CSV header should be a single column with a header of 'Member' without quotes

Import-CSV "C:\path\members.csv" | ForEach-Object {
Add-UnifiedGroupLinks –Identity "O365GroupName" –LinkType Members  –Links $_.member
}

#Add single users to list of groups.  Replace path and file name of the TXT and the email

Foreach ($group in (get-content "c:\path\groups.txt")){
    Add-UnifiedGroupLinks $group –LinkType Member -Links "newhire@email.com"
}