Table of Contents

Method TryCreateChannelAsync

Namespace
Skyline.DataMiner.DcpChatIntegrationHelper.Teams
Assembly
Skyline.DataMiner.DcpChatIntegrationHelper.dll

TryCreateChannelAsync(string, string, string, CancellationToken)

Tries to create a channel in the given team in Microsoft Teams.

Task<IChannel> TryCreateChannelAsync(string teamId, string channelName, string channelDescription, CancellationToken cancellationToken = default)

Parameters

teamId string

The id of the team where to create the channel. This id is returned when creating a team using TryCreateTeamAsync(string, string, CancellationToken) or when fetching them using TryGetTeamsAsync(CancellationToken).

channelName string

The name of the channel to be created.

channelDescription string

The description of the channel to be created.

cancellationToken CancellationToken

Returns

Task<IChannel>

The created channel. Never null.

Remarks

The organizations Microsoft Teams tenant must be configured in the Admin App and the required permissions must be granted. Note that, if new features require more permissions than were granted before, you can easily refresh your configured tenant to update it's permissions in the Admin App.

Exceptions

TeamsChatIntegrationException

If anything went wrong.