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

Vinod Survase 4,701 Reputation points
2021-10-19T10:14:29.42+00:00

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

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,022 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 94,521 Reputation points MVP
    2021-10-19T11:54:06.46+00:00

    Use the Add-TeamChannelUser cmdlet, or the corresponding Graph API endpoint: https://learn.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 person found this answer helpful.

0 additional answers

Sort by: Most helpful