SOLVED

powershell script to add dynamic group to private channel

%3CLINGO-SUB%20id%3D%22lingo-sub-1483467%22%20slang%3D%22en-US%22%3Epowershell%20script%20to%20add%20dynamic%20group%20to%20private%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1483467%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20add%20members%20using%20'Dynamic%20group'%20to%20the%20private%20channel%20on%20teams%3F%20I%20tried%20to%20search%20for%20dynamic%20group%20in%20private%20channel%20via%20MS%20Teams%20client%20but%20I'm%20not%20able%20to%20find%20it.%20However%20I%20can%20find%20and%20add%20the%20group%20on%20Teams.%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20has%20powershell%20script%20to%20add%20group%20on%20private%20channel%20on%20Teams%3F%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1483467%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%20Commands%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1483910%22%20slang%3D%22en-US%22%3ERe%3A%20powershell%20script%20to%20add%20dynamic%20group%20to%20private%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1483910%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20cannot%20add%20dynamic%20groups%20directly%2C%20but%20you%20can%20easily%20%22expand%22%20the%20membership%20and%20add%20each%20user%20individually%20to%20the%20private%20channel.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1484136%22%20slang%3D%22en-US%22%3ERe%3A%20powershell%20script%20to%20add%20dynamic%20group%20to%20private%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1484136%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B-ERR%3AREF-NOT-FOUND-%40Vasil%20Michev%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20know%20how%20to%20Expand%20users%20and%20add%20bulk%20of%20users%20using%20powershell%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1484583%22%20slang%3D%22en-US%22%3ERe%3A%20powershell%20script%20to%20add%20dynamic%20group%20to%20private%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1484583%22%20slang%3D%22en-US%22%3E%3CP%3EDepends%20on%20the%20group%20type%2C%20you%20will%20either%20have%20to%20run%20a%20query%20against%20Exchange%20Online%20or%20Azure%20AD.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi, 

Is it possible to add members using 'Dynamic group' to the private channel on teams? I tried to search for dynamic group in private channel via MS Teams client but I'm not able to find it. However I can find and add the group on Teams. 

Anyone has powershell script to add group on private channel on Teams?

Thanks in advance.

3 Replies
Highlighted
Best Response confirmed by ThereseSolimeno (Microsoft)
Solution

You cannot add dynamic groups directly, but you can easily "expand" the membership and add each user individually to the private channel.

Highlighted

Thanks @Vasil Michev 

Do you know how to Expand users and add bulk of users using powershell?

Highlighted

Depends on the group type, you will either have to run a query against Exchange Online or Azure AD.