question

VinodSurvase-1595 avatar image
0 Votes"
VinodSurvase-1595 asked

How to add members and owners in private channels via script in bulk?

How to add members and owners in private channels via script in bulk?

office-teams-windows-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

michev avatar image
1 Vote"
michev answered VinodSurvase-1595 commented

Use the Add-TeamChannelUser cmdlet, or the corresponding Graph API endpoint: https://docs.microsoft.com/en-us/powershell/module/teams/add-teamchanneluser?view=teams-ps
Here's a quick example on how to bulk add via CSV:

 Import-Csv "blabla.csv” | % {Add-TeamChannelUser -GroupId GUID -DisplayName "channel name" -User $_.UPN}

where the CSV has a column called "UPN" to designate the users

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.