Table of Contents

Method TrySendChatNotificationAsync

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

TrySendChatNotificationAsync(string, string, CancellationToken)

Tries to send a notification/message in the given private/group chat in Microsoft Teams.

Task TrySendChatNotificationAsync(string chatId, string notification, CancellationToken cancellationToken = default)

Parameters

chatId string

The id of the private/group chat where to send the notification/message. This id is returned when creating a chat using TryCreatePrivateChatAsync(string, CancellationToken) or when fetching one using TryGetPrivateChatAsync(string, CancellationToken)

notification string

The notification/message to send in the chat.

cancellationToken CancellationToken

Returns

Task

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.

TrySendChatNotificationAsync(string, IEnumerable<AdaptiveElement>, string, CancellationToken)

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

Task TrySendChatNotificationAsync(string chatId, IEnumerable<AdaptiveElement> notification, string summary = null, CancellationToken cancellationToken = default)

Parameters

chatId string

The id of the private/group chat where to send the notification/message. This id is returned when creating a chat using TryCreatePrivateChatAsync(string, CancellationToken) or when fetching one using TryGetPrivateChatAsync(string, CancellationToken)

notification IEnumerable<AdaptiveElement>

The notification/message using AdaptiveCards.AdaptiveElements (see AdaptiveCards.AdaptiveCard) to send in the chat. 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.

cancellationToken CancellationToken

Returns

Task

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.