Skip to content

Commit 88c5fea

Browse files
Merge pull request #223521 from angiurgiu/patch-15
Create data-loss-prevention.md
2 parents c1d25f9 + 6c23e4d commit 88c5fea

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Integrate Azure Communication Services with Microsoft Teams Data Loss Prevention
3+
titleSuffix: An Azure Communication Services how-to guide
4+
description: Learn how to integrate with Microsoft Teams Data Loss Prevention policies by subscribing to Real-time Chat Notifications
5+
author: angiurgiu
6+
ms.author: agiurg
7+
ms.date: 01/10/2023
8+
ms.topic: how-to
9+
ms.service: azure-communication-services
10+
ms.subservice: chat
11+
ms.custom: template-how-to
12+
---
13+
# How to integrate with Microsoft Teams Data Loss Prevention policies by subscribing to real-time chat notifications
14+
15+
Microsoft Teams administrator can configure policies for data loss prevention (DLP) to prevent leakage of sensitive information from Teams users in Teams meetings. Developers can integrate chat in Teams meetings with Azure Communication Services for Communication Services users via the Communication Services UI library or custom integration. This article describes how to incorporate data loss prevention without a UI library.
16+
17+
You need to subscribe to real-time notifications and listen for message updates. If a chat message from a Teams user contains sensitive content, the message content is updated to blank. The Azure Communication Services user interface has to be updated to indicate that the message cannot be displayed, for example, "Message was blocked as it contains sensitive information.". There could be a delay of a couple of seconds before a policy violation is detected and the message content is updated. You can find an example of such code below.
18+
19+
Data Loss Prevention policies only apply to messages sent by Teams users and aren't meant to protect Azure Communications users from sending out sensitive information.
20+
21+
```javascript
22+
let endpointUrl = '<replace with your resource endpoint>';
23+
24+
// The user access token generated as part of the pre-requisites
25+
let userAccessToken = '<USER_ACCESS_TOKEN>';
26+
27+
let chatClient = new ChatClient(endpointUrl, new AzureCommunicationTokenCredential(userAccessToken));
28+
29+
await chatClient.startRealtimeNotifications();
30+
chatClient.on("chatMessageEdited", (e) => {
31+
if(e.messageBody == “” && e.sender.kind == "microsoftTeamsUser")
32+
// Show UI message blocked
33+
});
34+
```
35+
36+
## Next steps
37+
- [Learn how to enable Microsoft Teams Data Loss Prevention](/microsoft-365/compliance/dlp-microsoft-teams?view=o365-worldwide)

articles/communication-services/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@ items:
425425
href: how-tos/call-automation/play-action.md
426426
- name: Gather user input with Recognize action
427427
href: how-tos/call-automation/recognize-action.md
428+
- name: Using the Chat SDK
429+
items:
430+
- name: Integrate with Data Loss Prevention policies
431+
href: how-tos/chat-sdk/data-loss-prevention.md
428432
- name: Samples
429433
items:
430434
- name: Overview

0 commit comments

Comments
 (0)