Edit

Share via


Add-TeamChannelUser

Adds an owner or member to the private channel.

Syntax

Default (Default)

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

Description

The command will return immediately, but the Teams application will not reflect the update immediately. To see the update you should refresh the members page.

Note: Technical limitations of private channels apply. To add a user as a member to a channel, they need to first be a member of the team. To make a user an owner of a channel, they need to first be a member of the channel.

Note: This cmdlet is part of the Public Preview version of Teams PowerShell Module, for more information see Install Teams PowerShell public preview and also see Microsoft Teams PowerShell Release Notes.

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.

Example 3

Add-TeamChannelUser -GroupId 31f1ff6c-d48c-4f8a-b2e1-abca7fd399df -DisplayName "Engineering" -User 0e4249a7-6cfd-8c93-a510-91cda44c8c73 -TenantId dcd143cb-c4ae-4364-9faf-e1c3242bf4ff

Adds external user 0e4249a7-6cfd-8c93-a510-91cda44c8c73 to a shared channel.

Parameters

-DisplayName

Display name of the private channel

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-GroupId

GroupId of the parent team

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Role

Owner

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TenantId

TenantId of the external user

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-User

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

GroupId

DisplayName

User

Role

TenantId