Table of Contents

Method TrySendChannelNotification

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

TrySendChannelNotification(string, string, string)

Tries to send a notification/message in the given channel in Microsoft Teams.

void TrySendChannelNotification(string teamId, string channelId, string notification)

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).

channelId string

The id of the channel where to send the notification/message. This id is returned when creating a channel using TryCreateChannelAsync(string, string, string, CancellationToken) or when fetching them using TryGetChannelsAsync(string, CancellationToken).

notification string

The notification/message to send in the channel.

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.

TrySendChannelNotification(string, string, IEnumerable<AdaptiveElement>, string)

Tries to send a notification/message using AdaptiveCards.AdaptiveElements (see AdaptiveCards.AdaptiveCard) in the given channel in Microsoft Teams.

void TrySendChannelNotification(string teamId, string channelId, IEnumerable<AdaptiveElement> notification, string summary = null)

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).

channelId string

The id of the channel where to send the notification/message. This id is returned when creating a channel using TryCreateChannelAsync(string, string, string, CancellationToken) or when fetching them using TryGetChannelsAsync(string, CancellationToken).

notification IEnumerable<AdaptiveElement>

The notification/message using AdaptiveCards.AdaptiveElements (see AdaptiveCards.AdaptiveCard) to send in the channel. Read more on Adaptive Cards > Schema Explorer > body.

summary string

The summary about this notification. A short text that will be used as the description of the notification and immersive readers. Optional, no default value.

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.