Add-TeamChannelUser

Adds an owner or member to the private channel.

Note: the command will return immediately, but the Teams application will not reflect the update immediately, please refresh the members page to see the update.

To turn an existing Member into an Owner, first Add-TeamChannelUser -User foo to add them to the members list, then Add-TeamChannelUser -User foo -Role Owner to add them to owner list.

Syntax

Add-TeamChannelUser
   -GroupId <String>
   -DisplayName <String>
   -User <String>
   [-Role <String>]
   [<CommonParameters>]

Description

Important

Modules in the PS INT gallery for Microsoft Teams run on the /beta version in Microsoft Graph and are subject to change. Int modules can be install from here https://www.poshtestgallery.com/packages/MicrosoftTeams.

Examples

Example 1

Add-TeamChannelUser -GroupId 31f1ff6c-d48c-4f8a-b2e1-abca7fd399df -DisplayName "Engineering" -User dmx@example.com

Add user dmx@example.com to private channel with name "Engineering" under the given group.

Example 2

Add-TeamChannelUser -GroupId 31f1ff6c-d48c-4f8a-b2e1-abca7fd399df -DisplayName "Engineering" -User dmx@example.com -Role Owner

Promote user dmx@example.com to an owner of private channel with name "Engineering" under the given group.

Parameters

-DisplayName

Display name of the private channel

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-GroupId

GroupId of the parent team

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Role

Owner

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-User

User's UPN (user principal name - e.g. johndoe@example.com)

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

GroupId, DisplayName, User, Role