Microsoft Purview and Sensitivity Label Policy are available in your workspace integrations. Saving the policy sets which labels to block. SharePoint, OneDrive, Outlook Email, Microsoft Teams, and Microsoft Excel withhold blocked content only after those integrations apply the saved policy.
Open the policy
- Go to Integrations in your workspace settings.
- Open Microsoft Purview, or open SharePoint, OneDrive, Outlook Email, Microsoft Teams, or Microsoft Excel and click Purview settings.
- Connect Microsoft Purview if no connection exists. The connection needs
SensitivityLabel.Read,User.Read,openid, andoffline_access.

Load labels
Open the menu beside Load labels and choose a connection. The selected connection is checked. Then click Load labels. Until a tenant is loaded, the line reads “Select a Purview connection and load labels for that Microsoft tenant.” After a successful load, the table replaces that line.
Allow or block labels
The table columns are Label, Applicable to, Encryption, and Allowed. Applicable to is Email, Files, or Email (Outlook) and files (SharePoint & OneDrive). Encryption shows whether the label encrypts files and emails. A single file or email can still have different encryption settings.
Where the policy applies
When the integrations apply the saved policy:- SharePoint and OneDrive. File reads, metadata, downloads, copy sources, uploads to an existing path, search, and folder listings classify the file before content is returned or replaced. A new path can be created. A shortcut is judged by its target. Document-library rows are classified as files. Ordinary list rows are not. Editing fields on a document-library row is allowed even when the file is blocked. Sites, folders, drives, and site pages are not classified as documents.
- Outlook Email. Reads, search, drafts lists, moves, flags, categories, and polling triggers classify the message before the body is returned. Blocked messages are left out of polls.
- Microsoft Teams. Message text is not classified. A downloadable SharePoint or OneDrive attachment is classified before download. A blocked attachment is omitted. The message and its other attachments are still returned.
- Microsoft Excel. The workbook is classified before cells, sheets, tables, or charts are read, and again before an edit. Editing a blocked workbook is refused.
Purview decryption
Purview decryption is on the same Microsoft Purview screen, under the sensitivity label policy. Each integration starts off. Turn a switch on when members should read allowed protected content from that integration. Each switch applies to the entire workspace, for every member’s connection to that integration. You can’t turn decryption on for single members or groups.
- SharePoint and OneDrive. Files and documents, including a file downloaded into a synced folder. Decryption runs only after the label policy allows the file.
- Outlook Email. Email bodies and attachments, including new-email triggers.
- Microsoft Teams. Cloud attachments in chats and channels. Message text and meeting transcripts are not decrypted.
- Microsoft Excel. Workbook content for supported read actions. The read returns saved cell values, without recalculating formulas. Edits and password-protected workbooks are not covered.
user_impersonation. If your OAuth client uses manual scopes, add user_impersonation in its settings. Once both are allowed, members must reauthorize existing connections before decryption starts.

How decryption works
Decryption runs after the label policy and never overrides it.- Langdock checks the label policy first. A blocked file or email is withheld before decryption starts.
- Content without Purview encryption is returned as usual.
- Encrypted content is decrypted with the member’s own Microsoft rights. Microsoft checks those rights for each file.
- If decryption is unavailable, denied, or fails, the protected content is not returned.
.docx, .xlsx, .pptx, .pdf, and encrypted Outlook messages (.rpmsg), up to 25 MiB. Macro-enabled Office files, Office templates, and generic .pfile files are not decrypted. Content protected with Double Key Encryption is not decrypted either, because it also needs a key from your own DKE service.
Tokens and decrypted content
- App identity. Langdock’s Microsoft Information Protection app is covered by Microsoft’s Information Protection Integration Agreement. The app identifies Langdock to Microsoft and grants no access to files on its own. Access always comes from the member’s integration connection.
- Tokens. The decryption service receives only a short-lived Azure Rights Management token for the member. It never receives the refresh token or your OAuth client secret. The refresh token stays encrypted in the member’s connection and is updated when Microsoft rotates it. Each Rights Management token stays in memory for one request and is not reused for other files.
- Decrypted content. Decrypted content is returned and stored like any other content from the integration. The decryption service keeps no copy.
- Microsoft telemetry. The Microsoft Information Protection SDK sends minimal diagnostic events to Microsoft. Langdock sets these events to the EU data boundary, so Microsoft routes and processes them in the EU. This does not change where your content is stored.
What Langdock requests from Microsoft
Langdock checks the sensitivity label of each file and email before anything reaches the AI. It reads the label first and requests the content only when the label is allowed. A blocked file’s content and a blocked email’s body are never requested. In two cases, Langdock receives a little more before the check. It uses that data only for the check, and blocked items never reach the AI:- SharePoint search and Excel file search. Microsoft returns a short preview with every result.
- SharePoint and OneDrive folder listings. Langdock requests each file’s name, link, and type with the listing. Folder Sync needs them to keep a file whose label can’t be checked right now.