Skip to content

Commit 96baedb

Browse files
authored
Update data-loss-prevention.md
1 parent 5240ce5 commit 96baedb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/communication-services/how-tos/chat-sdk/data-loss-prevention.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: template-how-to
1313
# How to integrate with Microsoft Teams Data Loss Prevention policies
1414
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
1515

16-
Microsoft Teams administrator can configure policies for data loss prevention (DLP) to prevent leakage of sensitive information from Teams users during Teams meetings. Developers have the option to integrate chat functionality in Teams meetings with Azure Communication Services. This can be done either through the Azure Communication Services UI library or through a custom integration. This article describes how to incorporate data loss prevention without a UI library.
16+
Microsoft Teams administrator can configure policies for data loss prevention (DLP) to prevent leakage of sensitive information from Teams users during Teams meetings. Developers have the option to integrate chat functionality in Teams meetings with Azure Communication Services. This can be done either through the Azure Communication Services UI library or through a custom integration. This article describes how to incorporate data loss prevention without using the UI library.
1717

1818
You need to set up your application to listen for real-time updates on message edits. If a Teams user sends a message containing sensitive content, the message will be automatically replaced with a blank message and flagged with a "policyViolation" result. Your application should update its user interface to reflect that the message has been blocked. For example, display a message such as "Message was blocked as it contains sensitive information." Be aware that there may be a brief delay, usually a couple of seconds, between when a message is sent and when a policy violation is detected and applied. You can find an example of such code below.
1919

@@ -30,7 +30,7 @@ let chatClient = new ChatClient(endpointUrl, new AzureCommunicationTokenCredenti
3030

3131
await chatClient.startRealtimeNotifications();
3232
chatClient.on("chatMessageEdited", (e) => {
33-
if (e.policyViolation.result == "contentBlocked") {
33+
if (e.policyViolation?.result == "contentBlocked") {
3434
// Show UI message blocked
3535
}
3636
});
@@ -40,7 +40,7 @@ chatClient.on("chatMessageEdited", (e) => {
4040
```javascript
4141
const messages = chatThreadClient.listMessages();
4242
for await (const message of messages) {
43-
if (message.policyViolation.result == "contentBlocked") {
43+
if (message.policyViolation?.result == "contentBlocked") {
4444
// Show UI message blocked
4545
}
4646
}

0 commit comments

Comments
 (0)