Microsoft Purview MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Microsoft Purview MCP or direct API to manage eDiscovery cases, apply retention labels, review sensitivity labels, and handle subject rights requests through natural language.

Microsoft Purview logoMicrosoft Purview
Oauth2S2s Oauth2

Microsoft Purview is a Microsoft Graph service for eDiscovery, records management, and information protection. It helps organizations govern sensitive data and meet compliance requirements.

180 Tools

Try Microsoft Purview now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Microsoft Purview
Try asking
TOOLS

Supported Tools

Every Microsoft Purview action and event your agent gets out of the box.

Activate Ediscovery Case Custodian

Reactivate a released custodian so they become part of the eDiscovery case again.

Add Ediscovery Case Members

Add an eDiscovery case member in Microsoft Purview.

Add Ediscovery Case Search Additional Sources

Add one mailbox or site as an additional source for an eDiscovery search.

Add Ediscovery Case Search Source

Associate one custodial or noncustodial data source with an eDiscovery search.

Add Search Results To Ediscovery Review Set

Start the long-running process that adds an eDiscovery search collection to a review set.

Apply Ediscovery Case Custodian Hold

Apply a hold to one custodian through the stable v1.

Apply Ediscovery Case Custodians Hold

Apply holds to selected custodians in an eDiscovery case and start asynchronous compliance processing.

Apply Ediscovery Case Noncustodial Data Source Hold

Apply a hold to one noncustodial data source through the stable v1.

Apply Ediscovery Case Noncustodial Data Sources Hold

Apply holds to selected noncustodial data sources in an eDiscovery case and start asynchronous compliance processing.

Apply Ediscovery Case Review Set Query Tags

Start the asynchronous process of adding, removing, or simultaneously adding and removing tags on files selected by a review set query.

Close Ediscovery Case

Close an eDiscovery case.

Compute Current User Governance Protection Scopes

Compute data-protection policies and actions for the signed-in user.

Compute Tenant Governance Protection Scopes

Compute tenant-wide data-protection policies, actions, and bindings.

Compute Tenant Governance Sensitivity Labels Inheritance

Compute the inherited tenant sensitivity label for selected labels and content formats.

Compute Tenant Governance Sensitivity Labels Rights And Inheritance

Compute usage rights and inherited labels for protected tenant content.

Compute User Governance Protection Scopes

Compute data-protection policies and actions for a specific user.

Create Authority

Create an authority template in Microsoft Purview records management.

Create Category

Create a category template in Microsoft Purview records management.

Create Category Subcategory

Create a subcategory template under a category in Microsoft Purview records management.

Create Citation

Create a citation template in Microsoft Purview records management.

Create Current User Governance Content Activity

Write a persistent Microsoft Purview compliance activity for the signed-in user.

Create Department

Create a department template in Microsoft Purview records management.

Create Ediscovery Case

Create a named eDiscovery case for an investigation, with an optional description and customer reference number.

Create Ediscovery Case Custodian

Create one custodian in a Microsoft Purview eDiscovery case.

Create Ediscovery Case Custodian Source

Create one site, user, or unified-group source for an eDiscovery custodian.

Create Ediscovery Case Legal Hold

Create an eDiscovery hold policy.

Create Ediscovery Case Legal Hold Source

Create one site or user source on a Microsoft Purview eDiscovery legal-hold policy.

Create Ediscovery Case Noncustodial Data Source

Create one noncustodial data source in a Microsoft Purview eDiscovery case.

Create Ediscovery Case Review Set

Create a review set in an eDiscovery case.

Create Ediscovery Case Review Set Query

Create a KQL query in an eDiscovery review set.

Create Ediscovery Case Search

Create a search in a Microsoft Purview eDiscovery case.

Create Ediscovery Case Tag

Create a review tag for a Microsoft Purview eDiscovery case.

Create File Plan Reference

Create a file plan reference template in Microsoft Purview records management.

Create Retention Event

Create a retention event in Microsoft Purview records management.

Create Retention Event Type

Create a retention event type in Microsoft Purview records management.

Create Retention Label

Create a retention label in Microsoft Purview records management.

Create Subject Rights Request

Create a regulated subject rights request in Microsoft Purview.

Create Subject Rights Request Note

Create an authored note on a Microsoft Purview subject rights request.

Create User Governance Content Activity

Write a persistent Microsoft Purview compliance activity for a specified user.

Delete Authority

Permanently delete an authority template.

Delete Category

Permanently delete a category template.

Delete Category Subcategory

Permanently delete a subcategory template from its parent category.

Delete Citation

Permanently delete a citation template.

Delete Department

Permanently delete a department template.

Delete Ediscovery Case

Delete an eDiscovery case.

Delete Ediscovery Case Case Member

Remove an eDiscovery case member.

Delete Ediscovery Case Custodian Source

Remove one site, unified-group, or user source association from an eDiscovery custodian.

Delete Ediscovery Case Legal Hold

Permanently delete an eDiscovery hold policy, remove all associated holds, and release its sites and mailboxes.

Delete Ediscovery Case Legal Hold Source

Remove one site or user source association from an eDiscovery legal-hold policy.

Delete Ediscovery Case Review Set Query

Permanently delete a query from an eDiscovery review set.

Delete Ediscovery Case Search

Permanently delete an eDiscovery search.

Delete Ediscovery Case Tag

Remove an eDiscovery review tag.

Delete File Plan Reference

Permanently delete a file plan reference template through the Microsoft Graph v1.

Delete Retention Event

Delete a retention event from Microsoft Purview records management.

Delete Retention Event Type

Permanently delete a retention event type.

Delete Retention Label

Permanently delete a retention label.

Disable Ediscovery Case Legal Hold Policy

Disable an eDiscovery legal-hold policy and start asynchronous removal from its configured sources.

Enable Ediscovery Case Legal Hold Policy

Enable an eDiscovery legal-hold policy and start asynchronous distribution to its configured sources.

Estimate Ediscovery Case Search Statistics

Start a potentially long-running estimate job for an eDiscovery search.

Evaluate Current User Sensitivity Labels Application

Evaluate which sensitivity-label actions apply for the signed-in user and desired content state.

Evaluate Current User Sensitivity Labels Classification Results

Evaluate classification results against sensitivity-label policy for the signed-in user.

Evaluate Current User Sensitivity Labels Removal

Evaluate removal of a sensitivity label for the signed-in user.

Evaluate Tenant Information Protection Sensitivity Labels Application

Evaluate sensitivity-label application against tenant information-protection policy.

Evaluate User Sensitivity Labels Application

Evaluate sensitivity-label application for a specific user's policy context.

Evaluate User Sensitivity Labels Classification Results

Evaluate classification results for a specific user's information-protection policy.

Evaluate User Sensitivity Labels Removal

Evaluate sensitivity-label removal for a specific user's policy context.

Evaluate Users Sensitivity Labels Classification Results

Evaluate classification results in the tenant-wide users information-protection context.

Evaluate Users Sensitivity Labels Removal

Evaluate label removal in the tenant-wide users information-protection context.

Export Ediscovery Case Review Set

Start a long-running review set export.

Export Ediscovery Case Review Set Query

Start a long-running export of files matching a review set query.

Export Ediscovery Case Search Report

Start a potentially long-running eDiscovery search report export.

Export Ediscovery Case Search Result

Start a potentially long-running eDiscovery search-result export.

Extract Current User Sensitivity Labels Content Label

Extract sensitivity-label information from content metadata for the signed-in user.

Extract User Sensitivity Labels Content Label

Extract a sensitivity label from existing content metadata for a specified user using application authentication.

Extract Users Sensitivity Labels Content Label

Extract a content label in the tenant-wide users information-protection context.

Get Authority

Get an authority template from Microsoft Purview records management.

Get Category

Get a category template from Microsoft Purview records management.

Get Category Subcategory

Get a subcategory template from Microsoft Purview records management.

Get Citation

Get a citation template from Microsoft Purview records management.

Get Current User Label Policy Settings

Get information-protection label policy settings for the signed-in user.

Get Current User Sensitivity Label

Get one sensitivity label available to the signed-in user.

Get Department

Get a department template from Microsoft Purview records management.

Get Ediscovery Case

Get one eDiscovery case from Microsoft Purview.

Get Ediscovery Case Custodian

Get ediscovery custodian in Microsoft Purview ediscovery custodians and sources.

Get Ediscovery Case Legal Hold

Get ediscovery hold policy in Microsoft Purview ediscovery holds.

Get Ediscovery Case Noncustodial Data Source

Get ediscovery noncustodial data source in Microsoft Purview ediscovery custodians and sources.

Get Ediscovery Case Operation

Get case-operation status and safe metadata without exposing export download URLs.

Get Ediscovery Case Review Set

Get one review set from an eDiscovery case.

Get Ediscovery Case Review Set File

Get metadata for one review set file through the beta-only route.

Get Ediscovery Case Review Set File Tag

Get a tag by ID from the tags expanded on a beta eDiscovery review set file.

Get Ediscovery Case Review Set File Tag Child Tag

Get an applied child tag by its ID and parent tag ID from a beta eDiscovery review set file.

Get Ediscovery Case Review Set File Tag Parent

Get the expanded parent of a tag associated with a beta eDiscovery review set file.

Get Ediscovery Case Review Set Query

Get one query from an eDiscovery review set.

Get Ediscovery Case Search

Get one Microsoft Purview eDiscovery search by case and search identifier.

Get Ediscovery Case Search Last Estimate Statistics Operation

Get the latest estimate-statistics operation for an eDiscovery search to monitor long-running processing.

Get Ediscovery Case Settings

Get settings for a Microsoft Purview eDiscovery case.

Get Ediscovery Case Tag

Get one review tag from a Microsoft Purview eDiscovery case.

Get Ediscovery Case Tags As Hierarchy

Return the review-tag hierarchy for a Microsoft Purview eDiscovery case.

Get File Plan Reference

Get a file plan reference template from Microsoft Purview records management.

Get Retention Event

Get one retention event from Microsoft Purview records management.

Get Retention Event Label

Get a retention label associated with a Microsoft Purview retention event.

Get Retention Event Retention Event Type

Get the retention event type associated with a retention event.

Get Retention Event Type

Get a retention event type from Microsoft Purview records management.

Get Retention Label

Get a retention label from Microsoft Purview records management.

Get Retention Label Descriptor

Get one authority, category, citation, department, or file plan reference descriptor associated with a retention label.

Get Retention Label Event Type

Get the retention event type associated with a retention label.

Get Subject Rights Request

Get one subject rights request from Microsoft Purview.

Get Subject Rights Request Final Attachment

Download the completed subject rights request attachment as a framework-managed file without exposing the provider's redirect credentials.

Get Subject Rights Request Final Report

Download the completed subject rights request report as a framework-managed file without exposing provider redirect credentials.

Get Tenant Governance Sensitivity Label

Get one tenant sensitivity label through the data-security and governance API.

Get Tenant Governance Sensitivity Label Rights

Get the calling user's usage rights for a tenant sensitivity label.

Get Tenant Information Protection Label Policy Settings

Get tenant information-protection label policy settings.

Get Tenant Information Protection Sensitivity Label

Get one tenant sensitivity label through the beta information-protection API.

Get User Label Policy Settings

Get information-protection label policy settings for a specific user.

Get User Sensitivity Label

Get one sensitivity label available to a specific user.

List Authorities

List authority templates in Microsoft Purview records management.

List Categories

List category templates in Microsoft Purview records management.

List Category Subcategories

List subcategory templates for a category in Microsoft Purview records management.

List Citations

List citation templates in Microsoft Purview records management.

List Current User Sensitivity Labels

List sensitivity labels available to the signed-in user.

List Departments

List department templates in Microsoft Purview records management.

List Ediscovery Case Custodian Last Index Operation

Get the most recent indexing operation for one custodian in an eDiscovery case.

List Ediscovery Case Custodians

List ediscovery custodian in Microsoft Purview ediscovery custodians and sources.

List Ediscovery Case Custodian Sources

List site, unified-group, or user sources that belong to one custodian in an eDiscovery case.

List Ediscovery Case Legal Holds

List ediscovery hold policies in Microsoft Purview ediscovery holds.

List Ediscovery Case Legal Hold Sources

List one page of site or user sources attached directly to an eDiscovery legal-hold policy, excluding sources owned by a custodian.

List Ediscovery Case Members

List member objects for an eDiscovery case in Microsoft Purview.

List Ediscovery Case Noncustodial Data Sources

List ediscovery noncustodial data sources in Microsoft Purview ediscovery custodians and sources.

List Ediscovery Case Noncustodial Source Last Index Operation

Get the most recent indexing operation for one noncustodial data source in an eDiscovery case.

List Ediscovery Case Operations

List case operations for a Microsoft Purview eDiscovery case without exposing export download URLs.

List Ediscovery Case Review Set Files

Return one page of file metadata from a review set using the beta-only Graph route.

List Ediscovery Case Review Set Queries

Return one page of queries associated with an eDiscovery review set.

List Ediscovery Case Review Sets

Return one page of review sets in an eDiscovery case.

List Ediscovery Cases

List eDiscovery cases in Microsoft Purview.

List Ediscovery Case Searches

List one page of searches in a Microsoft Purview eDiscovery case.

List Ediscovery Case Search Sources

List one page of additional, custodial, or noncustodial data sources associated with an eDiscovery search.

List Ediscovery Case Tags

List review tags for a Microsoft Purview eDiscovery case.

List File Plan References

List file plan reference templates in Microsoft Purview records management.

List Retention Events

List retention events in Microsoft Purview records management.

List Retention Event Types

List retention event types in Microsoft Purview records management.

List Retention Labels

List retention labels in Microsoft Purview records management without an unsupported page-size query.

List Subject Rights Request Notes

List authored notes associated with a Microsoft Purview subject rights request.

List Subject Rights Requests

List subject rights requests in Microsoft Purview.

List Tenant Governance Sensitivity Labels

List tenant sensitivity labels through the data-security and governance API.

List Tenant Information Protection Sensitivity Labels

List tenant sensitivity labels through the beta information-protection API.

List User Sensitivity Labels

List sensitivity labels available to a specific user.

Process Current User Governance Content

Process content against data protection policies in the signed-in user's context.

Process Tenant Governance Content

Evaluate content against tenant data-security and governance policies.

Process Tenant Governance Content Async

Submit a batch of content for tenant data-security and governance processing.

Process User Governance Content

Process content against data protection policies in a specified user's context.

Purge Ediscovery Case Search Data

Start an eDiscovery data purge.

Release Ediscovery Case Custodian

Release one custodian from an eDiscovery case and start asynchronous cleanup of its case data and holds.

Release Ediscovery Case Noncustodial Data Source

Release one noncustodial data source from an eDiscovery case and start asynchronous cleanup of its case data and holds.

Remove Ediscovery Case Custodian Hold

Remove the hold from one custodian through the stable v1.

Remove Ediscovery Case Custodians Hold

Remove holds from selected custodians in an eDiscovery case and start asynchronous compliance processing.

Remove Ediscovery Case Noncustodial Data Source Hold

Remove the hold from one noncustodial data source through the stable v1.

Remove Ediscovery Case Noncustodial Data Sources Hold

Remove holds from selected noncustodial data sources in an eDiscovery case and start asynchronous compliance processing.

Remove Ediscovery Case Search Source

Remove one custodial or noncustodial data-source association from an eDiscovery search.

Remove Retention Event Retention Event Type

Remove a retention event's event-type association.

Remove Retention Label Descriptor

Unlink one authority, category, citation, department, or file plan reference descriptor from a retention label.

Remove Retention Label Event Type

Remove a retention label's event-type association.

Reopen Ediscovery Case

Reopen an eDiscovery case in Microsoft Purview.

Reset Ediscovery Case Settings To Default

Reset Microsoft Purview eDiscovery case settings to their defaults.

Retry Ediscovery Case Legal Hold Policy

Retry distribution of an eDiscovery legal-hold policy after a failed deployment, then monitor the asynchronous case operation.

Run Ediscovery Case Review Set Query

Run a review set query through the beta-only route and return matching file metadata.

Update Ediscovery Case

Update an eDiscovery case in Microsoft Purview.

Update Ediscovery Case Custodian Index

Update the index for one custodian through the stable v1.

Update Ediscovery Case Custodians Index

Start asynchronous index updates for selected custodians in an eDiscovery case.

Update Ediscovery Case Legal Hold

Update the KQL content query or description of an eDiscovery legal-hold policy.

Update Ediscovery Case Noncustodial Data Source Index

Start an asynchronous index update for one noncustodial data source in an eDiscovery case.

Update Ediscovery Case Review Set

Update the description or display name of an eDiscovery review set.

Update Ediscovery Case Review Set Query

Update the name and optionally the KQL of an eDiscovery review set query.

Update Ediscovery Case Search

Update a Microsoft Purview eDiscovery search.

Update Ediscovery Case Settings

Update one or more settings for a Microsoft Purview eDiscovery case.

Update Ediscovery Case Tag

Update a review tag in a Microsoft Purview eDiscovery case.

Update Retention Event Retention Event Type

Update the description of the shared retention event type associated with a retention event.

Update Retention Event Type

Update a retention event type in Microsoft Purview records management.

Update Retention Label

Update supported properties of a retention label in Microsoft Purview records management.

Update Retention Label Event Type

Update the description of the shared retention event type associated with a retention label.

Update Subject Rights Request

Update supported properties of a Microsoft Purview subject rights request.

SETUP GUIDE

Connect Microsoft Purview MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["microsoft_purview"],
  mcp: true,
});
Create a session scoped to Microsoft Purview and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "List all open Microsoft Purview eDiscovery cases",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Microsoft Purview request
SETUP GUIDE

Connect Microsoft Purview API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["microsoft_purview"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Microsoft Purview
3

Run Microsoft Purview tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "List all open Microsoft Purview eDiscovery cases" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Microsoft Purview tool calls through the session, and print the final answer

Why Use Composio?

AI Native Microsoft Purview Integration

  • Supports both Microsoft Purview MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Microsoft Purview data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Microsoft Purview access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Microsoft Purview
  • Scoped, least privilege access to Microsoft Purview resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Microsoft Purview.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Microsoft Purview tool your agent needs.Free to start.

Start building