Microsoft 365 Admin

Official registry Other

Microsoft 365 administration via Graph API application permissions (read-only by default).

What can you do with Microsoft 365 Admin?

  • 674 tools covering security, audit, identity, app credentials, guest users, Exchange, Intune (devices, apps, MAM, reports, Settings catalog & Endpoint security (BitLocker, Antivirus, Firewall, ASR), encryption report, Windows Update profiles...
  • Application permissions (client credentials) — no user interaction required
  • Read-only by default — write operations require explicit --allow-writes
  • Risk classification on write tools (low/medium/high/critical)
  • Presets to filter tools by domain (security, audit, identity, etc.)
  • Two transports: stdio (default) and HTTP (StreamableHTTP)
  • Multi-cloud: Microsoft global and China (21Vianet)
  • Key Vault support for secrets management

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package @okapi-ca/ms-365-admin-mcp-server
Claude Code
claude mcp add microsoft-365-admin -e 'MS365_ADMIN_MCP_TENANT_ID=<MS365_ADMIN_MCP_TENANT_ID>' -e 'MS365_ADMIN_MCP_CLIENT_ID=<MS365_ADMIN_MCP_CLIENT_ID>' -e 'MS365_ADMIN_MCP_CLIENT_SECRET=<your ms365_admin_mcp_client_secret>' -e 'MS365_ADMIN_MCP_KEYVAULT_URL=<MS365_ADMIN_MCP_KEYVAULT_URL>' -e 'MS365_ADMIN_MCP_CLOUD_TYPE=<MS365_ADMIN_MCP_CLOUD_TYPE>' -e 'MS365_ADMIN_MCP_MAX_TOP=<MS365_ADMIN_MCP_MAX_TOP>' -e 'READ_ONLY=<READ_ONLY>' -e 'ENABLED_TOOLS=<ENABLED_TOOLS>' -- npx -y @okapi-ca/ms-365-admin-mcp-server@0.6.3
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "microsoft-365-admin": {
            "command": "npx",
            "args": [
                "-y",
                "@okapi-ca/ms-365-admin-mcp-server@0.6.3"
            ],
            "env": {
                "MS365_ADMIN_MCP_TENANT_ID": "<MS365_ADMIN_MCP_TENANT_ID>",
                "MS365_ADMIN_MCP_CLIENT_ID": "<MS365_ADMIN_MCP_CLIENT_ID>",
                "MS365_ADMIN_MCP_CLIENT_SECRET": "<your ms365_admin_mcp_client_secret>",
                "MS365_ADMIN_MCP_KEYVAULT_URL": "<MS365_ADMIN_MCP_KEYVAULT_URL>",
                "MS365_ADMIN_MCP_CLOUD_TYPE": "<MS365_ADMIN_MCP_CLOUD_TYPE>",
                "MS365_ADMIN_MCP_MAX_TOP": "<MS365_ADMIN_MCP_MAX_TOP>",
                "READ_ONLY": "<READ_ONLY>",
                "ENABLED_TOOLS": "<ENABLED_TOOLS>"
            }
        }
    }
}

Environment variables

  • MS365_ADMIN_MCP_TENANT_ID required Azure AD tenant ID (specific GUID, not 'common').
  • MS365_ADMIN_MCP_CLIENT_ID required App registration client ID with the required application permissions.
  • MS365_ADMIN_MCP_CLIENT_SECRET required secret App registration client secret. Prefer Azure Key Vault via MS365_ADMIN_MCP_KEYVAULT_URL for production.
  • MS365_ADMIN_MCP_KEYVAULT_URL Optional Azure Key Vault URL. When set, secrets are pulled from the vault and override the env-var values above.
  • MS365_ADMIN_MCP_CLOUD_TYPE Cloud environment: 'global' (default) or 'china' (21Vianet).
  • MS365_ADMIN_MCP_MAX_TOP Cap on the $top query parameter to limit result size.
  • READ_ONLY Set to 'true' or '1' to force read-only mode (default behavior; mutations require --allow-writes).
  • ENABLED_TOOLS Regex to filter the catalog of available tools.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. ms-365-admin-mcp-server
  2. Features
  3. Documentation
  4. Prerequisites
  5. Installation
  6. Configuration
  7. Usage
  8. Available tools (674)
  9. Azure AD permissions
  10. Remote HTTP deployment
  11. Development
  12. Security
  13. Acknowledgments
  14. License

ms-365-admin-mcp-server

A Model Context Protocol (MCP) server for Microsoft 365 administration via Graph API application permissions (client credentials).

Built on the architecture and endpoint-driven design pioneered by Softeria/ms-365-mcp-server, and complementary to it: Softeria's server uses delegated permissions for end-user productivity scenarios, while this one uses application permissions for admin operations — security monitoring, identity audits, incident response, and service health. See Acknowledgments below.

Features

  • 674 tools covering security, audit, identity, app credentials, guest users, Exchange, Intune (devices, apps, MAM, reports, Settings catalog & Endpoint security (BitLocker, Antivirus, Firewall, ASR), encryption report, Windows Update profiles, BitLocker and LAPS rotation, macOS Platform Scripts, macOS custom attribute scripts, assignment filters, Remediations, Windows PowerShell scripts, custom compliance scripts), governance (PIM, access reviews, entitlement, lifecycle), compliance, threat intelligence, advanced hunting, Defender for Identity (sensors, candidates, migration, identity accounts, audit policy), Microsoft 365 Copilot admin (usage reports, interaction history audit, AI users, meeting insights, agent registrations, policy settings), custom security attributes, LAPS, policies, reports, incident response, eDiscovery v3 (cases, custodians, noncustodial data sources, review sets, queries, exports, operations), Purview DSPM (protection scopes), event-based retention triggers, Teams online meeting attendance reports (app-only with Application Access Policy), deleted chats restore (admin recovery flow), Teams chat investigation reads (Chat.Read.All for triage; eDiscovery v3 for court-admissible production), Cloud PC, call records, Universal Print, information protection, SharePoint admin, and records management
  • Application permissions (client credentials) — no user interaction required
  • Read-only by default — write operations require explicit --allow-writes
  • Risk classification on write tools (low/medium/high/critical)
  • Presets to filter tools by domain (security, audit, identity, etc.)
  • Two transports: stdio (default) and HTTP (StreamableHTTP)
  • Multi-cloud: Microsoft global and China (21Vianet)
  • Key Vault support for secrets management

Documentation

DocumentPurpose
docs/USE_CASES.md18 typical admin scenarios with sample prompts and tool lists
docs/playbooks/End-to-end security incident response playbooks
agent-skills/Drop-in skills for LLM agents (Claude Code et al.) with safety patterns
docs/APP_REGISTRATION.mdStep-by-step Azure AD app registration and permission consent
docs/HTTP_DEPLOYMENT.mdHTTP transport, JWT validation, Docker, Azure Container Apps
docs/AZURE_DEPLOYMENT_SECURITY.mdThreat model, required controls, and checklist for Azure production deploys
docs/TROUBLESHOOTING.mdCommon errors and how to diagnose them
docs/ARCHITECTURE.mdInternal architecture and code generation pipeline
docs/RISK_MODEL.mdRisk classification rubric for write tools
CONTRIBUTING.mdHow to contribute new tools, presets, and fixes
SECURITY.mdVulnerability reporting and operator hardening checklist
CHANGELOG.mdRelease history

Prerequisites

  • Node.js >= 18
  • An Azure AD app registration with application permissions (not delegated)
  • A specific tenant ID (not "common")

Installation

npm install -g @okapi-ca/ms-365-admin-mcp-server
ms-365-admin-mcp-server --help
Docker
docker pull ghcr.io/okapi-ca/ms-365-admin-mcp-server:latest
docker run --rm -i \
  -e MS365_ADMIN_MCP_CLIENT_ID=... \
  -e MS365_ADMIN_MCP_CLIENT_SECRET=... \
  -e MS365_ADMIN_MCP_TENANT_ID=... \
  ghcr.io/okapi-ca/ms-365-admin-mcp-server:latest
From source
git clone https://github.com/okapi-ca/ms-365-admin-mcp-server.git
cd ms-365-admin-mcp-server
npm install
npm run generate
npm run build

Configuration

Environment variables
VariableRequiredDescription
MS365_ADMIN_MCP_CLIENT_IDYesApp registration client ID
MS365_ADMIN_MCP_CLIENT_SECRETYesApp registration client secret
MS365_ADMIN_MCP_TENANT_IDYesAzure AD tenant ID (must be specific)
MS365_ADMIN_MCP_CLOUD_TYPENoglobal (default) or china
MS365_ADMIN_MCP_KEYVAULT_URLNoAzure Key Vault URL (overrides env vars)
MS365_ADMIN_MCP_MAX_TOPNoCap $top query param to limit result size
READ_ONLYNotrue/1 to force read-only (default behavior)
ENABLED_TOOLSNoRegex to filter available tools
MCP client configuration (Claude Desktop, etc.)
{
  "mcpServers": {
    "ms365-admin": {
      "command": "node",
      "args": ["/path/to/ms-365-admin-mcp-server/dist/index.js"],
      "env": {
        "MS365_ADMIN_MCP_CLIENT_ID": "your-client-id",
        "MS365_ADMIN_MCP_CLIENT_SECRET": "your-client-secret",
        "MS365_ADMIN_MCP_TENANT_ID": "your-tenant-id"
      }
    }
  }
}
VS Code (1.102+)

VS Code consumes the same MCP protocol but uses a different config layout — servers instead of mcpServers, an explicit type field, and inputs for secret prompts. A ready-to-copy sample lives at .vscode/mcp.json.example; copy it to .vscode/mcp.json and VS Code will prompt for the tenant / client / secret on first start, then store them in its secret store (the real mcp.json is gitignored so resolved secrets never reach the repo).

Minimal stdio setup:

{
  "inputs": [
    { "type": "promptString", "id": "ms365-tenant-id", "description": "Tenant ID" },
    { "type": "promptString", "id": "ms365-client-id", "description": "Client ID" },
    {
      "type": "promptString",
      "id": "ms365-client-secret",
      "description": "Client secret",
      "password": true,
    },
  ],
  "servers": {
    "ms365-admin": {
      "type": "stdio",
      "command": "ms-365-admin-mcp-server",
      "args": ["--preset", "security,audit,identity,health"],
      "env": {
        "MS365_ADMIN_MCP_TENANT_ID": "${input:ms365-tenant-id}",
        "MS365_ADMIN_MCP_CLIENT_ID": "${input:ms365-client-id}",
        "MS365_ADMIN_MCP_CLIENT_SECRET": "${input:ms365-client-secret}",
      },
    },
  },
}

For remote HTTP deployments, use "type": "http" with a url field (VS Code 1.103+ handles OAuth 2.0 Dynamic Client Registration natively) or fall back to the mcp-remote bridge when the native browser flow is unavailable — see the example file for both shapes.

Tools surface in Agent mode (GitHub Copilot Chat). VS Code asks for per-tool approval; the --preset flag above keeps the catalog manageable. Use Cmd/Ctrl+Shift+P → MCP: List Servers → Show Output to see logs.

Catalog size limit on Claude.ai surfaces

Claude.ai, Claude Desktop and cloud sessions serve each connector's tools under a fixed budget of 1 MiB of input schema (compact JSON; tool names and descriptions are not counted). Tools are admitted in alphabetical order and a tool that no longer fits is dropped silently. Claude Code CLI is not affected. The limit is not documented publicly.

In a cloud session linked to a Mac, the claude-device bridge relays every local MCP server under one connector (lcl-<server>-<tool>), so all local servers share that budget, and this server's tools sort after most of them.

Request bodies are therefore advertised shallow (src/advertised-schema.ts): the entity's own fields with their descriptions, nested objects as free-form objects, and no Read-only. fields. Graph validates the body; the server forwards it as sent. With writes enabled the catalog advertises about 595 KB of input schema, and test/advertised-schema.test.ts fails the build above 768 KiB.

If tools still go missing in a cloud session, shrink what this server advertises (read-only mode, --preset, --enabled-tools), disable unused local servers, or register this server as its own connector so it gets a budget of its own.

Remote HTTP server: device_code authentication (RFC 8628)

If the server runs in HTTP / OAuth mode on a remote host (e.g. Azure Container Apps) and the client connects via mcp-remote, the standard flow requires a browser to reach localhost:14543/oauth/callback. When that isn't possible — macOS Platform SSO hijacks the WebKit flow, Claude Code runs in a headless Docker container, the user is on a remote SSH dev env — use the ms-365-admin-mcp-auth bootstrap to pre-seed mcp-remote's token cache instead.

npx -p @okapi-ca/ms-365-admin-mcp-server@latest ms-365-admin-mcp-auth \
  --server https://your-mcp-host.azurecontainerapps.io/mcp

The helper prints a URL and a user code; you sign in on any device you trust (phone, another laptop) and the tokens are written to ~/.mcp-auth/mcp-remote-<version>/. Claude Desktop / Claude Code then launches mcp-remote normally and finds the cached tokens without ever opening a browser.

See docs/TROUBLESHOOTING.md for Docker / remote-dev patterns and exit code reference.

Usage

CLI options
--read-only              Read-only mode (default)
--allow-writes           Enable write operations
--enabled-tools <regex>  Filter tools by regex pattern
--preset <names>         Use preset categories (comma-separated)
--partition <name>       Tool partition served on /mcp/<group> in HTTP mode (default: domains)
--list-presets           List available presets and exit
--list-tools             List available tools and exit
--list-permissions       List required Graph API permissions and exit
--verify-login           Test credentials against Graph API and exit
--cloud <type>           Cloud environment: global (default) or china
--transport <type>       Transport: stdio (default) or http
--port <number>          HTTP port (default: 8080)
--host <address>         HTTP bind address (default: 127.0.0.1)
--allowed-clients <ids>  Comma-separated Entra app IDs (required for HTTP)
-v                       Verbose logging
Presets
# Security alerts and incidents only
node dist/index.js --preset security

# Identity management tools
node dist/index.js --preset identity

# Multiple presets
node dist/index.js --preset security,audit,identity
PresetDescription
securitySecurity alerts, incidents, attack simulations, and threat intelligence
auditDirectory audits, sign-ins, provisioning logs, deleted items
healthService health and Message Center
reportsUsage reports (Teams, Email, SharePoint, OneDrive, Mailbox, M365 Apps)
identityUsers, groups, roles, devices, PIM, guest users, external identities
exchangeExchange administration (message traces, mailboxes)
intuneManaged devices, compliance, configurations, Autopilot, apps, RBAC
governanceAccess reviews, entitlement management, lifecycle workflows, terms of use
complianceLicenses, Secure Score, Identity Protection, risk detections, policies
responseIncident response write operations (disable, revoke, confirm, dismiss)
ediscoveryeDiscovery cases (Microsoft Purview)
cloudpcCloud PC / Windows 365 (provisioning, images, connections, settings, audit)
callrecordsTeams call records
printUniversal Print (printers, shares, connectors, services, operations, tasks)
infoprotectionInformation Protection (BitLocker recovery keys, threat assessment)
sharepointadminSharePoint tenant administration settings
retentionRecords Management (retention labels, file plan metadata)
allAll available tools
Verify credentials
node dist/index.js --verify-login

Available tools (674)

Security (11)
ToolMethodRisk
list-security-alertsGET
get-security-alertGET
update-security-alertPATCHmedium
list-security-incidentsGET
get-security-incidentGET
update-security-incidentPATCHmedium
list-attack-simulationsGET
get-attack-simulationGET
create-attack-simulationPOSThigh
update-attack-simulationPATCHmedium
delete-attack-simulationDELETEmedium
Audit logs & deleted items (5)
ToolMethod
list-directory-auditsGET
list-sign-insGET
list-provisioning-logsGET
list-deleted-usersGET
list-deleted-groupsGET
Service health (3)
ToolMethod
list-service-healthGET
list-service-issuesGET
list-service-messagesGET
Usage reports (8)
ToolMethod
get-teams-activity-reportGET
get-email-activity-reportGET
get-active-users-reportGET
get-sharepoint-usage-reportGET
get-onedrive-usage-reportGET
get-active-user-counts-reportGET
get-mailbox-usage-reportGET
get-m365-apps-usage-reportGET
Users (9)
ToolMethodRisk
list-usersGET
get-userGET
list-user-membershipsGET
list-user-auth-methodsGET
list-user-devicesGET
create-userPOSThigh
delete-userDELETEcritical
assign-user-licensePOSTmedium
reprocess-user-licensePOSTlow

There is no general-purpose update-user. The only PATCH on /users/{id} this server exposes is disable-user-account (see Incident response), which is deliberately narrow: it sets accountEnabled and nothing else.

Devices (2)
ToolMethod
list-devicesGET
get-deviceGET
Groups (11)
ToolMethodRisk
list-groupsGET
get-groupGET
list-group-membersGET
list-group-ownersGET
create-groupPOSTmedium
update-groupPATCHmedium
delete-groupDELETEcritical
add-group-memberPOSTmedium
remove-group-memberDELETEmedium
add-group-ownerPOSThigh
remove-group-ownerDELETEhigh

remove-group-member, add-group-owner and remove-group-owner run pre-flight guardrails: they refuse on an on-premises-synced group, a member removal on a dynamic group, and the removal of a group's only owner. See docs/ARCHITECTURE.md.

Directory roles & PIM (9)
ToolMethodRisk
list-directory-rolesGET
list-role-membersGET
list-role-assignmentsGET
list-role-definitionsGET
list-pim-eligible-assignmentsGET
list-pim-active-assignmentsGET
add-directory-role-memberPOSTcritical
delete-role-assignmentDELETEcritical
remove-directory-role-memberDELETEcritical

delete-role-assignment is the one to reach for: list-role-assignments with $filter=principalId eq '{user-id}' already returns the assignment id it takes. remove-directory-role-member covers roles activated the legacy way. Both refuse unconditionally on the tenant's last active Global Administrator — an anti-lockout guardrail no parameter overrides.

Administrative units (8)
ToolMethodRisk
list-administrative-unitsGET
get-administrative-unitGET
list-administrative-unit-membersGET
create-administrative-unitPOSTmedium
update-administrative-unitPATCHmedium
delete-administrative-unitDELETEhigh
add-administrative-unit-memberPOSTmedium
remove-administrative-unit-memberDELETEhigh
Conditional access (3)
ToolMethod
list-conditional-access-policiesGET
get-conditional-access-policyGET
list-named-locationsGET
Applications & app roles (11)
ToolMethodRisk
list-applicationsGET
list-service-principalsGET
list-oauth2-grantsGET
list-user-app-role-assignmentsGET
list-sp-app-role-assignmentsGET
update-applicationPATCHhigh
delete-applicationDELETEcritical
update-service-principalPATCHhigh
delete-oauth2-grantDELETEhigh
delete-sp-app-role-assignmentDELETEhigh
delete-user-app-role-assignmentDELETEhigh

delete-oauth2-grant is the remediation for an illicit consent grant: list-oauth2-grants identifies it, this revokes it. A grant with consentType: AllPrincipals revokes the app's delegated access for every user at once — check the blast radius first, and pair with revoke-user-sessions, since revoking consent does not end existing sessions.

App credentials & owners (7)
ToolMethod
get-applicationGET
list-application-ownersGET
list-app-federated-credentialsGET
get-app-federated-credentialGET
get-service-principalGET
list-service-principal-ownersGET
list-sp-delegated-permissionsGET
App management policies (2)
ToolMethod
list-app-management-policiesGET
get-app-management-policyGET
Organization & domains (4)
ToolMethodRisk
get-organizationGET
list-domainsGET
create-domainPOSThigh
verify-domainPOSTmedium
Licenses (2)
ToolMethod
list-subscribed-skusGET
get-subscribed-skuGET
Secure Score (4)
ToolMethod
list-secure-scoresGET
get-secure-scoreGET
list-secure-score-controlsGET
get-secure-score-controlGET
Identity Protection & risk detections (7)
ToolMethod
list-risky-usersGET
get-risky-userGET
list-risky-user-historyGET
list-risky-service-principalsGET
get-risky-service-principalGET
list-risk-detectionsGET
get-risk-detectionGET
Security & access policies (13)
ToolMethodRisk
get-auth-methods-policyGET
list-auth-method-configsGET
get-auth-method-configGET
get-security-defaultsGET
get-admin-consent-policyGET
list-auth-strength-policiesGET
get-auth-strength-policyGET
create-auth-strength-policyPOSThigh
update-auth-strength-policyPATCHhigh
delete-auth-strength-policyDELETEhigh
get-cross-tenant-access-policyGET
list-cross-tenant-partnersGET
change-user-passwordPOSThigh
Guest user invitations (2)
ToolMethodRisk
list-invitationsGET
create-invitationPOSTmedium
External identity providers (2)
ToolMethod
list-identity-providersGET
get-identity-providerGET
Self-service sign-up (4)
ToolMethod
list-b2x-user-flowsGET
get-b2x-user-flowGET
list-api-connectorsGET
get-api-connectorGET
Custom authentication extensions (2)
ToolMethod
list-custom-auth-extensionsGET
get-custom-auth-extensionGET
Exchange message traces (2)
ToolMethod
list-message-tracesGET
get-message-traceGET
Exchange mailboxes (7)
ToolMethodRisk
list-exchange-mailboxesGET
get-exchange-mailboxGET
list-exchange-mailbox-foldersGET
get-exchange-mailbox-folderGET
export-exchange-mailbox-itemsPOSTmedium
update-exchange-mailboxPATCHmedium
delete-exchange-mailboxDELETEcritical
Threat intelligence - hosts (4)
ToolMethod
list-threat-intel-hostsGET
get-threat-intel-hostGET
get-threat-intel-host-whoisGET
list-threat-intel-host-pairsGET
Threat intelligence - articles & profiles (6)
ToolMethod
list-threat-intel-articlesGET
get-threat-intel-articleGET
list-threat-intel-article-indicatorsGET
list-threat-intel-profilesGET
get-threat-intel-profileGET
list-threat-intel-profile-indicatorsGET
Threat intelligence - vulnerabilities & WHOIS (4)
ToolMethod
list-threat-intel-vulnerabilitiesGET
get-threat-intel-vulnerabilityGET
list-threat-intel-whois-recordsGET
get-threat-intel-whois-recordGET
Threat intelligence - infrastructure (2)
ToolMethod
list-threat-intel-host-componentsGET
list-threat-intel-ssl-certsGET
Managed devices (8)
ToolMethodRisk
list-managed-devicesGET
get-managed-devices-by-namesGET
get-managed-deviceGET
get-windows-protection-stateGET
list-device-compliance-statesGET
list-device-configuration-statesGET
get-managed-device-overviewGET
delete-managed-deviceDELETEcritical
Compliance policies (5)
ToolMethod
list-compliance-policiesGET
get-compliance-policyGET
list-compliance-policy-device-statusesGET
get-compliance-policy-status-overviewGET
get-compliance-state-summaryGET
Device configurations (4)
ToolMethod
list-device-configurationsGET
get-device-configurationGET
get-device-configuration-status-overviewGET
list-device-configuration-device-statusesGET
Settings catalog & Endpoint security (6)

Settings catalog policies, including every modern Endpoint security policy (Disk encryption / BitLocker, Antivirus, Firewall, Attack surface reduction, EDR, Account protection). Targets Graph beta — configurationPolicies has no v1.0 equivalent. The two report actions are POSTs that only read; they need --allow-writes like the other Intune reports.

ToolMethodRisk
list-configuration-policiesGET
get-configuration-policyGET
list-configuration-policy-settingsGET
list-configuration-policy-templatesGET
get-configuration-policy-device-statusPOSTlow
get-configuration-policy-device-summaryPOSTlow
Endpoint security intents (legacy templates) (4)

Template-based Endpoint security policies created before the move to the Settings catalog. Targets Graph beta. An Endpoint security audit must cover these and the Settings catalog both.

ToolMethod
list-intentsGET
get-intentGET
list-intent-device-statesGET
list-intent-templatesGET
Device encryption (1)

Intune encryption report: readiness, state, TPM version and the BitLocker / FileVault policies that reached each device. Targets Graph beta.

ToolMethod
list-managed-device-encryption-statesGET
Windows Update profiles (3)

Feature and quality update profiles, which override the deferrals of a device's Windows Update for Business ring (rings themselves are device configurations). Targets Graph beta.

ToolMethod
list-windows-feature-update-profilesGET
list-windows-quality-update-profilesGET
list-windows-quality-update-policiesGET
macOS Platform Scripts (6)

Intune shell scripts deployed to managed macOS devices. Targets Graph beta (/beta/deviceManagement/deviceShellScripts) — Microsoft has never promoted this endpoint to v1.0. Requires DeviceManagementScripts.ReadWrite.All.

ToolMethodRisk
list-device-shell-scriptsGET
get-device-shell-scriptGET
create-device-shell-scriptPOSTmedium
update-device-shell-scriptPATCHmedium
delete-device-shell-scriptDELETEhigh
assign-device-shell-scriptPOSTmedium

Notes:

  • scriptContent is strict base64 (not URL-safe) of a script with LF line endings — CRLF will break execution on Macs.
  • runAsAccount=user is required for scripts that interact with the user session (e.g. osascript touching System Events).
  • assign-device-shell-script REPLACES all existing assignments — it is not additive. To add a group without removing others, first GET the current assignments, append the new target, then POST the full merged list.
  • By default get-device-shell-script does not return scriptContent; pass $select=id,displayName,scriptContent,... to fetch the base64 body.
Intune Remediations / Proactive Remediations (8)

Paired detection + remediation PowerShell scripts for Windows 10/11 Azure AD joined devices. Targets Graph beta (/beta/deviceManagement/deviceHealthScripts). Requires DeviceManagementScripts.ReadWrite.All.

ToolMethodRisk
list-device-health-scriptsGET
get-device-health-scriptGET
list-device-health-script-run-statesGET
get-device-health-script-run-summaryGET
create-device-health-scriptPOSTmedium
update-device-health-scriptPATCHmedium
delete-device-health-scriptDELETEhigh
assign-device-health-scriptPOSTmedium

Notes:

  • Both detectionScriptContent and remediationScriptContent are base64-encoded PowerShell — UTF-8 encoded scripts before base64.
  • Detection script returns exit code 0 (compliant) or 1 (needs remediation). The remediation script only runs when detection returns 1.
  • assign-device-health-script REPLACES all existing assignments — schedules can be daily / hourly / run-once. Set runRemediationScript: false for detect-only deployments.
  • By default get-device-health-script does not return the script bodies; pass $select=id,displayName,detectionScriptContent,remediationScriptContent,....
  • Modern replacement for deviceShellScripts for Windows "verify + fix" use cases (CIS hardening, agent install verification, service state).
Assignment filters (5)

Dynamic membership filters that scope policy/app assignments to a sub-set of an Entra group. Targets Graph beta (/beta/deviceManagement/assignmentFilters). Requires DeviceManagementConfiguration.ReadWrite.All.

ToolMethodRisk
list-assignment-filtersGET
get-assignment-filterGET
create-assignment-filterPOSTmedium
update-assignment-filterPATCHmedium
delete-assignment-filterDELETEhigh

Notes:

  • Rule syntax is KQL-like on device properties — example: (device.osVersion -startsWith "14") for macOS Sonoma only, (device.deviceOwnership -eq "Corporate") for corporate-owned devices.
  • Operators: -eq, -ne, -startsWith, -contains, -in, -matches, joined by -and / -or.
  • Filters are referenced by deviceConfigurations / mobileApps / deviceCompliancePolicies assignments (not by users — you target the assignment to a group, then add a filter to narrow it).
  • assignmentFilterManagementType: devices for device-scoped assignments, apps for app-scoped (some properties differ).
  • Deleting a filter that is in use will silently fall the dependent assignments back to "all members of the group" — audit assignments before deleting.
macOS custom attribute shell scripts (6)

Intune shell scripts whose STDOUT is stored as a named custom attribute on each device — useful for surfacing inventory data (FileVault, Gatekeeper, encryption flags, custom markers) and driving dynamic group filters. Targets Graph beta (/beta/deviceManagement/deviceCustomAttributeShellScripts). Requires DeviceManagementScripts.ReadWrite.All.

ToolMethodRisk
list-device-custom-attribute-shell-scriptsGET
get-device-custom-attribute-shell-scriptGET
create-device-custom-attribute-shell-scriptPOSTmedium
update-device-custom-attribute-shell-scriptPATCHmedium
delete-device-custom-attribute-shell-scriptDELETEhigh
assign-device-custom-attribute-shell-scriptPOSTmedium

Notes:

  • The script's STDOUT becomes the value stored under customAttributeName on each device.
  • customAttributeType controls how Intune parses STDOUT: integer, string, or dateTime (ISO 8601).
  • scriptContent is strict base64 of a script with LF line endings — CRLF breaks execution on Macs.
  • Changing customAttributeName or customAttributeType after deployment breaks downstream dynamic groups and assignment filters that reference the previous key — audit references first.
  • Deleting a script does NOT clear previously-collected attribute values from device records.
Windows PowerShell scripts (deviceManagementScripts) (6)

One-shot PowerShell scripts deployed to managed Windows 10/11 devices. Runs once per device per assignment, retries on failure. For detect-and-fix patterns use deviceHealthScripts (Remediations) instead. Targets Graph beta (/beta/deviceManagement/deviceManagementScripts). Requires DeviceManagementScripts.ReadWrite.All.

ToolMethodRisk
list-device-management-scriptsGET
get-device-management-scriptGET
create-device-management-scriptPOSTmedium
update-device-management-scriptPATCHmedium
delete-device-management-scriptDELETEhigh
assign-device-management-scriptPOSTmedium

Notes:

  • scriptContent is base64-encoded UTF-8 PowerShell.
  • Runs ONCE per device on the next Intune Management Extension sync after assignment — does NOT re-run after successful execution (use deviceHealthScripts for repeating patterns).
  • Updating scriptContent does NOT re-run on devices that already succeeded; delete + recreate to force re-execution.
  • enforceSignatureCheck=true requires code-signed scripts (recommended for prod).
  • runAs32Bit=true forces 32-bit PowerShell on 64-bit Windows (rarely needed).
Windows custom compliance scripts (deviceComplianceScripts) (6)

PowerShell scripts that emit a JSON object on STDOUT evaluated against rules declared on an associated windows10CustomComplianceConfiguration policy — for organization-specific compliance signals beyond the built-in BitLocker / Defender / firewall checks. Targets Graph beta (/beta/deviceManagement/deviceComplianceScripts). Requires DeviceManagementScripts.ReadWrite.All.

ToolMethodRisk
list-device-compliance-scriptsGET
get-device-compliance-scriptGET
create-device-compliance-scriptPOSTmedium
update-device-compliance-scriptPATCHmedium
delete-device-compliance-scriptDELETEhigh
assign-device-compliance-scriptPOSTmedium

Notes:

  • detectionScriptContent must emit a JSON object on STDOUT (e.g. ConvertTo-Json -Compress @{BitLockerEnabled=$true;TpmReady=$true}).
  • The script alone has no compliance effect — you must also author a windows10CustomComplianceConfiguration policy with matching rules.
  • Changing the JSON keys without updating the linked policy's rules silently breaks compliance evaluation.
  • Deleting a script in use causes referencing compliance policies to fail evaluation on next device check-in.
  • Assignment shape reuses deviceHealthScriptAssignment (set runRemediationScript: false since compliance scripts have no remediation pairing).
Enrollment & Autopilot (10)
ToolMethodRisk
list-enrollment-configurationsGET
get-enrollment-configurationGET
list-autopilot-devicesGET
get-autopilot-deviceGET
create-enrollment-configurationPOSTmedium
update-enrollment-configurationPATCHmedium
delete-enrollment-configurationDELETEhigh
update-autopilot-devicePATCHmedium
delete-autopilot-deviceDELETEhigh
import-autopilot-devicePOSTmedium
Detected apps (3)
ToolMethod
list-detected-appsGET
get-detected-appGET
list-detected-app-devicesGET
Intune RBAC & config (7)
ToolMethod
list-intune-audit-eventsGET
get-software-update-summaryGET
get-apple-push-certificateGET
list-intune-role-definitionsGET
list-intune-role-assignmentsGET
list-intune-terms-and-conditionsGET
list-intune-terms-acceptancesGET
Intune connectors & updates (3)
ToolMethod
get-intune-conditional-access-settingsGET
list-mtd-connectorsGET
list-ios-update-statusesGET
Device categories (1)
ToolMethod
list-device-categoriesGET
Access reviews (5)
ToolMethod
list-access-review-definitionsGET
get-access-review-definitionGET
list-access-review-instancesGET
get-access-review-instanceGET
list-access-review-decisionsGET
Entitlement management (7)
ToolMethod
list-access-packagesGET
get-access-packageGET
list-access-package-assignmentsGET
list-access-package-requestsGET
list-access-package-catalogsGET
list-connected-organizationsGET
get-entitlement-management-settingsGET
Lifecycle workflows (3)
ToolMethod
list-lifecycle-workflowsGET
get-lifecycle-workflowGET
list-lifecycle-task-definitionsGET
PIM for Groups (2)
ToolMethod
list-pim-group-assignment-schedulesGET
list-pim-group-eligibility-schedulesGET
Terms of use (3)
ToolMethod
list-terms-of-use-agreementsGET
get-terms-of-use-agreementGET
list-terms-of-use-acceptancesGET
ToolMethod
list-app-consent-requestsGET
get-app-consent-requestGET
list-user-consent-requestsGET
Incident response (17) -- requires --allow-writes
ToolMethodRisk
disable-user-accountPATCHcritical
revoke-user-sessionsPOSThigh
add-security-alert-commentPOSTlow
update-devicePATCHhigh
confirm-compromised-usersPOSThigh
dismiss-risky-usersPOSThigh
delete-user-phone-auth-methodDELETEhigh
delete-user-fido2-auth-methodDELETEhigh
delete-user-authenticator-auth-methodDELETEhigh
delete-user-software-oath-auth-methodDELETEhigh
delete-user-windows-hello-auth-methodDELETEhigh
delete-user-email-auth-methodDELETEhigh
delete-user-temporary-access-pass-auth-methodDELETEhigh
confirm-compromised-service-principalsPOSThigh
dismiss-risky-service-principalsPOSThigh
confirm-safe-usersPOSThigh
run-hunting-queryPOSTlow

One deletion tool per authentication-method collection, since the ids are collection-scoped and not interchangeable. Run list-user-auth-methods first and match on @odata.type to pick the right tool and id. Graph refuses the deletion when the method is the user's only remaining MFA factor and MFA is required.

Intune device remote actions (18) -- requires --allow-writes
ToolMethodRisk
wipe-managed-devicePOSTcritical
retire-managed-devicePOSThigh
sync-managed-devicePOSTlow
reboot-managed-devicePOSThigh
remote-lock-devicePOSTmedium
reset-device-passcodePOSThigh
shutdown-managed-devicePOSThigh
disable-lost-modePOSTlow
locate-managed-devicePOSTlow
bypass-activation-lockPOSThigh
trigger-defender-scanPOSTlow
update-defender-signaturesPOSTlow
rotate-bitlocker-keysPOSTmedium
rotate-local-admin-passwordPOSTmedium
clean-windows-devicePOSTcritical
logout-shared-apple-userPOSTmedium
delete-shared-apple-userPOSThigh
update-windows-device-accountPOSTmedium
Conditional Access CRUD (7) -- requires --allow-writes
ToolMethodRisk
list-conditional-access-templatesGET
create-conditional-access-policyPOSThigh
update-conditional-access-policyPATCHhigh
delete-conditional-access-policyDELETEcritical
create-named-locationPOSTmedium
update-named-locationPATCHmedium
delete-named-locationDELETEhigh
Intune policies CRUD (8) -- requires --allow-writes
ToolMethodRisk
create-compliance-policyPOSTmedium
update-compliance-policyPATCHmedium
assign-compliance-policyPOSThigh
delete-compliance-policyDELETEhigh
create-device-configurationPOSTmedium
update-device-configurationPATCHmedium
assign-device-configurationPOSThigh
delete-device-configurationDELETEhigh
Settings catalog & Endpoint security CRUD (4) -- requires --allow-writes

Targets Graph beta. Requires DeviceManagementConfiguration.ReadWrite.All. assign-configuration-policy replaces the whole assignment list.

ToolMethodRisk
create-configuration-policyPOSTmedium
update-configuration-policyPATCHmedium
delete-configuration-policyDELETEhigh
assign-configuration-policyPOSThigh
Endpoint security intents CRUD (4) -- requires --allow-writes

Targets Graph beta. Requires DeviceManagementConfiguration.ReadWrite.All. assign-intent replaces the whole assignment list.

ToolMethodRisk
update-intentPATCHmedium
update-intent-settingsPOSTmedium
delete-intentDELETEhigh
assign-intentPOSThigh
OneDrive / user drive (DSAR enumeration) (4)

Read-only traversal of a user's personal drive, for subject-access requests. Content bytes are not exposed; these return metadata and download URLs.

ToolMethodRisk
get-user-driveGET
get-drive-rootGET
list-drive-childrenGET
get-drive-itemGET
Purview DSPM (protection scopes) (2)
ToolMethodRisk
get-data-security-governance-rootGET
compute-protection-scopesPOSTlow

compute-protection-scopes is a POST but computes rather than mutates — hence the low tier. It still needs --allow-writes.

Teams online meeting attendance (4)

Attendance reporting for a specific user's meetings. App-only access requires an Application Access Policy on the tenant, granted per service principal with Set-CsApplicationAccessPolicy; without it Graph answers 403 regardless of the Graph permission.

ToolMethodRisk
get-user-online-meetingGET
list-user-meeting-attendance-reportsGET
get-user-meeting-attendance-reportGET
list-user-meeting-attendance-recordsGET
Teams deleted chats (3)
ToolMethodRisk
list-deleted-chatsGET
get-deleted-chatGET
undo-delete-chatPOSTmedium

Administrative recovery flow for a chat a user deleted. The retention window is Microsoft's, not configurable here.

Teams chat investigation reads (5)

Triage reads over a user's chats, on Chat.Read.All. For court-admissible production use the eDiscovery tools instead — these reads carry no chain of custody.

ToolMethodRisk
list-user-chatsGET
get-chatGET
list-chat-membersGET
list-chat-messagesGET
get-chat-messageGET
Teams call records (11)
ToolMethod
list-call-recordsGET
get-call-recordGET
list-call-record-sessionsGET
get-call-record-sessionGET
list-call-session-segmentsGET
get-call-session-segmentGET
list-call-record-participantsGET
get-call-record-participantGET
get-call-record-organizerGET
get-pstn-callsGET
get-direct-routing-callsGET
Cloud PC / Windows 365 (10)
ToolMethodRisk
list-cloud-pcsGET
list-cloud-pc-provisioning-policiesGET
list-cloud-pc-device-imagesGET
list-cloud-pc-gallery-imagesGET
list-cloud-pc-on-premises-connectionsGET
list-cloud-pc-user-settingsGET
list-cloud-pc-audit-eventsGET
create-cloud-pc-provisioning-policyPOSTmedium
update-cloud-pc-provisioning-policyPATCHmedium
delete-cloud-pc-provisioning-policyDELETEhigh
Universal Print (6)
ToolMethodRisk
list-printersGET
list-print-sharesGET
list-print-connectorsGET
list-print-servicesGET
list-print-operationsGET
list-print-task-definitionsGET
Information Protection & Sensitivity Labels (7)
ToolMethod
list-bitlocker-recovery-keysGET
list-threat-assessment-requestsGET
list-sensitivity-labelsGET
get-sensitivity-labelGET
list-sensitivity-sublabelsGET
get-sensitivity-label-rightsGET
get-protection-scopesGET
SharePoint administration (25)
ToolMethodRisk
get-sharepoint-settingsGET
list-sharepoint-sitesGET
get-sharepoint-siteGET
update-sharepoint-sitePATCHmedium
list-site-drivesGET
get-site-default-driveGET
list-site-listsGET
get-site-listGET
create-site-listPOSTlow
update-site-listPATCHlow
delete-site-listDELETEhigh
list-site-list-itemsGET
create-site-list-itemPOSTlow
update-site-list-itemPATCHlow
delete-site-list-itemDELETEmedium
list-site-list-columnsGET
list-site-columnsGET
list-site-content-typesGET
list-site-permissionsGET
get-site-permissionGET
create-site-permissionPOSTmedium
update-site-permissionPATCHmedium
delete-site-permissionDELETEhigh
get-site-analyticsGET
list-site-subsitesGET
Records Management (9)
ToolMethodRisk
list-file-plan-authoritiesGET
list-file-plan-categoriesGET
list-file-plan-citationsGET
list-file-plan-departmentsGET
list-file-plan-referencesGET
get-retention-eventGET
create-retention-eventPOSTmedium
get-retention-event-typeGET
create-retention-event-typePOSTmedium

Listing or reading retentionLabels themselves is not exposed: Microsoft Graph does not support it with application permissions. Use delegated access or Security & Compliance PowerShell for that. list-retention-events is under Security advanced.

Teams administration (33)
ToolMethodRisk
list-teamsGET
create-teamPOSTmedium
get-teamGET
update-teamPATCHmedium
delete-teamDELETEcritical
list-team-admin-channelsGET
create-team-admin-channelPOSTlow
get-team-admin-channelGET
delete-team-admin-channelDELETEhigh
list-team-admin-membersGET
add-team-admin-membersPOSTmedium
remove-team-admin-membersPOSTmedium
get-team-admin-memberGET
list-team-installed-appsGET
archive-teamPOSTmedium
unarchive-teamPOSTlow
clone-teamPOSTmedium
list-team-operationsGET
list-team-permission-grantsGET
get-teams-app-settingsGET
update-teams-app-settingsPATCHhigh
list-deleted-teamsGET
list-teams-catalog-appsGET
get-teams-catalog-appGET
list-teams-app-definitionsGET
get-teams-admin-settingsGET
list-teams-user-configurationsGET
get-teams-admin-policyGET
list-teams-policy-assignmentsGET
list-teams-phone-assignmentsGET
assign-teams-phone-numberPOSTmedium
unassign-teams-phone-numberPOSThigh
get-teams-phone-number-operationGET
Intune reports (18) -- requires --allow-writes (POST endpoints)
ToolMethodRisk
intune-device-noncompliance-reportPOSTlow
intune-compliance-policy-noncompliance-reportPOSTlow
intune-compliance-policy-noncompliance-summaryPOSTlow
intune-compliance-setting-noncompliance-reportPOSTlow
intune-config-policy-noncompliance-reportPOSTlow
intune-config-policy-noncompliance-summaryPOSTlow
intune-config-setting-noncompliance-reportPOSTlow
intune-devices-without-compliance-reportPOSTlow
intune-noncompliant-devices-settings-reportPOSTlow
intune-policy-noncompliance-reportPOSTlow
intune-policy-noncompliance-summaryPOSTlow
intune-policy-noncompliance-metadataPOSTlow
intune-setting-noncompliance-reportPOSTlow
intune-report-filtersPOSTlow
intune-historical-reportPOSTlow
intune-cached-reportPOSTlow
list-intune-report-export-jobsGET
intune-device-app-install-status-reportPOSTlow
Intune partners & infrastructure (10)
ToolMethodRisk
list-compliance-management-partnersGET
list-device-management-partnersGET
list-exchange-connectorsGET
list-remote-assistance-partnersGET
list-notification-message-templatesGET
list-intune-resource-operationsGET
list-imported-autopilot-devicesGET
list-windows-malware-infoGET
list-intune-mobile-appsGET
list-intune-app-categoriesGET
Intune app management (11)
ToolMethodRisk
list-intune-app-configurationsGET
list-managed-app-policiesGET
list-managed-app-registrationsGET
list-managed-app-statusesGET
list-android-app-protectionsGET
list-ios-app-protectionsGET
list-default-app-protectionsGET
list-targeted-app-configurationsGET
list-mdm-wip-policiesGET
list-mam-wip-policiesGET
list-vpp-tokensGET
Advanced policies (15)
ToolMethodRisk
list-activity-timeout-policiesGET
get-authorization-policyGET
get-auth-flows-policyGET
list-claims-mapping-policiesGET
list-conditional-access-policies-v2GET
get-default-app-management-policyGET
get-device-registration-policyGET
list-feature-rollout-policiesGET
list-home-realm-discovery-policiesGET
list-permission-grant-policiesGET
list-role-management-policiesGET
list-role-management-policy-assignmentsGET
list-token-issuance-policiesGET
list-token-lifetime-policiesGET
get-cross-tenant-default-policyGET
Identity Governance+ (11)
ToolMethodRisk
list-entitlement-assignment-policiesGET
list-entitlement-resourcesGET
list-entitlement-resource-environmentsGET
list-lifecycle-workflow-templatesGET
get-lifecycle-workflow-settingsGET
list-lifecycle-custom-task-extensionsGET
list-deleted-lifecycle-workflowsGET
list-pim-group-assignment-requestsGET
list-pim-group-assignment-instancesGET
list-pim-group-eligibility-requestsGET
list-pim-group-eligibility-instancesGET
PIM role management (6)
ToolMethodRisk
list-access-review-historyGET
list-pim-role-assignment-requestsGET
list-pim-role-assignment-schedulesGET
list-pim-role-eligibility-requestsGET
list-pim-role-eligibility-schedulesGET
list-role-resource-namespacesGET
Identity Protection+ (1)
ToolMethodRisk
list-service-principal-risk-detectionsGET
Security advanced (9)
ToolMethodRisk
list-retention-eventsGET
list-retention-event-typesGET
list-subject-rights-requestsGET
list-simulation-automationsGET
list-simulation-trainingsGET
list-simulation-payloadsGET
list-simulation-end-user-notificationsGET
list-simulation-landing-pagesGET
list-simulation-login-pagesGET
Defender for Identity (24)

Full surface coverage of Microsoft Defender for Identity (DfI) administration via Graph: sensors, sensor candidates (auto-discovery), sensor migration to unified Defender XDR architecture, identity accounts (with break-glass invokeAction for AD on-prem / Okta), audit policy enforcement, and health alerts. Most endpoints are Graph v1.0; sensorMigration is beta-only.

ToolMethodRisk
list-identity-health-issuesGET
get-identity-health-issueGET
list-sensor-health-issuesGET
get-sensor-health-issueGET
list-identity-sensorsGET
get-identity-sensorGET
update-identity-sensorPATCHmedium
get-sensor-deployment-access-keyGET
get-sensor-deployment-package-uriGET
regenerate-sensor-deployment-access-keyPOSThigh
list-sensor-candidatesGET
get-sensor-candidateGET
get-sensor-candidate-activation-configGET
update-sensor-candidate-activation-configPATCHmedium
activate-sensor-candidatesPOSTmedium
list-sensor-migrationsGET
get-sensor-migrationGET
migrate-sensorsPOSThigh
get-identity-security-settingsGET
get-auto-auditing-configGET
update-auto-auditing-configPATCHmedium
list-identity-accountsGET
get-identity-accountGET
invoke-identity-account-actionPOSTcritical

Notes:

  • invoke-identity-account-action is the highest-impact write — performs identity-response actions (disable, enable, forcePasswordReset, revokeAllSessions, requireUserToSignInAgain, markUserAsCompromised) on accounts in their source system (AD on-prem, Okta). Action / provider compatibility: disable/enable for AD + Okta, forcePasswordReset for AD only, revokeAllSessions for Okta only.
  • regenerate-sensor-deployment-access-key invalidates the previous key immediately — coordinate with anyone rolling out new sensors before calling.
  • migrate-sensors restarts the sensor service on the target DC during migration to unified Defender XDR — brief capture gap (~minutes). Schedule maintenance windows for production DCs. Beta-only.
  • activate-sensor-candidates triggers sensor installation on detected hosts using the deployment access key flow. Verify with get-sensor-candidate first — wrong serverId installs on the wrong host.
  • update-auto-auditing-config with enabled=true makes DfI enforce the recommended Windows advanced audit policies on every sensor host (revert local admin overrides on next heartbeat) — recommended for production.

New Graph permissions required since v0.10.0 / 0.11.1 (must be consented on the app registration):

  • SecurityIdentitiesSensors.Read.All + SecurityIdentitiesSensors.ReadWrite.All (sensors mgmt)
  • SecurityIdentitiesAutoConfig.Read.All + SecurityIdentitiesAutoConfig.ReadWrite.All (autoAuditingConfiguration)
  • SecurityIdentitiesAccount.Read.All (identityAccounts list/get)
  • SecurityIdentitiesActions.ReadWrite.All (identityAccounts invokeAction — break-glass)
  • SecurityIdentitiesMigration.Read.All + SecurityIdentitiesMigration.ReadWrite.All (sensorMigration, beta)
Threat intelligence+ (6)
ToolMethodRisk
list-passive-dns-recordsGET
list-ssl-certificatesGET
list-threat-intel-subdomainsGET
list-threat-intel-host-portsGET
list-threat-intel-host-trackersGET
list-threat-intel-host-cookiesGET
Reports+ (5)
ToolMethodRisk
list-user-registration-detailsGET
list-daily-print-usage-by-printerGET
list-daily-print-usage-by-userGET
list-monthly-print-usage-by-printerGET
list-monthly-print-usage-by-userGET
Copilot admin (15)

Settings and policy:

ToolMethodRisk
get-copilot-admin-settingsGET
get-copilot-limited-modeGET
list-copilot-policy-settingsGET
get-copilot-policy-settingGET

Usage reports:

ToolMethodRisk
get-copilot-usage-user-detailGET
get-copilot-user-count-summaryGET
get-copilot-user-count-trendGET

Interaction history audit, AI users and meeting insights:

ToolMethodRisk
get-all-copilot-interactionsGET
get-user-copilot-interactionsGET
list-ai-usersGET
get-ai-userGET
list-ai-user-online-meetingsGET
list-ai-meeting-insightsGET
get-ai-meeting-insightGET

Agent registrations:

ToolMethodRisk
get-copilot-agent-registrationGET

get-all-copilot-interactions returns every enterprise Copilot interaction in the tenant — prompts and responses. Treat the output as regulated personal data.

Directory+ (5)
ToolMethodRisk
list-attribute-setsGET
list-custom-security-attributesGET
list-device-local-credentialsGET
list-federation-configurationsGET
list-on-premises-syncGET
Application credentials & owners CRUD (11) -- requires --allow-writes
ToolMethodRisk
create-applicationPOSThigh
add-application-passwordPOSThigh
remove-application-passwordPOSThigh
add-application-keyPOSThigh
remove-application-keyPOSThigh
add-application-ownerPOSThigh
remove-application-ownerDELETEhigh
create-app-federated-credentialPOSThigh
update-app-federated-credentialPATCHhigh
delete-app-federated-credentialDELETEhigh
set-application-verified-publisherPOSTmedium
Service Principals CRUD & credentials (10) -- requires --allow-writes
ToolMethodRisk
create-service-principalPOSThigh
delete-service-principalDELETEcritical
add-sp-passwordPOSThigh
remove-sp-passwordPOSThigh
add-sp-keyPOSThigh
remove-sp-keyPOSThigh
add-sp-token-signing-certificatePOSThigh
add-sp-ownerPOSThigh
remove-sp-ownerDELETEhigh
create-sp-app-role-assignmentPOSThigh
PIM activation & requests (10) -- requires --allow-writes
ToolMethodRisk
create-pim-role-assignment-requestPOSTcritical
cancel-pim-role-assignment-requestPOSThigh
create-pim-role-eligibility-requestPOSTcritical
cancel-pim-role-eligibility-requestPOSThigh
create-pim-group-assignment-requestPOSThigh
cancel-pim-group-assignment-requestPOSTmedium
create-pim-group-eligibility-requestPOSThigh
cancel-pim-group-eligibility-requestPOSTmedium
create-role-management-policy-assignmentPOSThigh
update-role-management-policyPATCHhigh
Entitlement Management CRUD (12) -- requires --allow-writes
ToolMethodRisk
create-access-packagePOSTmedium
update-access-packagePATCHmedium
delete-access-packageDELETEhigh
create-access-package-catalogPOSTmedium
update-access-package-catalogPATCHmedium
delete-access-package-catalogDELETEhigh
create-access-package-assignment-policyPOSTmedium
update-access-package-assignment-policyPUTmedium
delete-access-package-assignment-policyDELETEhigh
create-access-package-assignment-requestPOSTmedium
reprocess-access-package-assignment-requestPOSTlow
cancel-access-package-assignment-requestPOSTmedium
Lifecycle Workflows CRUD & execution (8) -- requires --allow-writes
ToolMethodRisk
create-lifecycle-workflowPOSTmedium
update-lifecycle-workflowPATCHmedium
delete-lifecycle-workflowDELETEhigh
activate-lifecycle-workflowPOSThigh
restore-lifecycle-workflowPOSTmedium
create-lifecycle-custom-task-extensionPOSTmedium
update-lifecycle-custom-task-extensionPATCHmedium
delete-lifecycle-custom-task-extensionDELETEhigh
Access Reviews CRUD & actions (8) -- requires --allow-writes
ToolMethodRisk
create-access-review-definitionPOSTmedium
update-access-review-definitionPUTmedium
delete-access-review-definitionDELETEhigh
stop-access-review-instancePOSThigh
send-reminder-access-reviewPOSTlow
reset-access-review-decisionsPOSThigh
apply-access-review-decisionsPOSThigh
accept-access-review-recommendationsPOSTmedium
eDiscovery (Purview) (33) -- writes require --allow-writes

Cases and searches:

ToolMethodRisk
list-ediscovery-casesGET
get-ediscovery-caseGET
create-ediscovery-casePOSTmedium
update-ediscovery-casePATCHmedium
delete-ediscovery-caseDELETEcritical
close-ediscovery-casePOSTmedium
reopen-ediscovery-casePOSTmedium
list-ediscovery-searchesGET
create-ediscovery-searchPOSTmedium
estimate-ediscovery-search-statisticsPOSTmedium

Custodians:

ToolMethodRisk
list-ediscovery-custodiansGET
get-ediscovery-custodianGET
create-ediscovery-custodianPOSTmedium
apply-hold-ediscovery-custodianPOSThigh
remove-hold-ediscovery-custodianPOSThigh
release-ediscovery-custodianPOSTmedium
update-ediscovery-custodian-indexPOSTlow

Non-custodial data sources:

ToolMethodRisk
list-ediscovery-noncustodial-data-sourcesGET
get-ediscovery-noncustodial-data-sourceGET
create-ediscovery-noncustodial-data-sourcePOSTmedium
apply-hold-ediscovery-noncustodial-data-sourcePOSTmedium
remove-hold-ediscovery-noncustodial-data-sourcePOSThigh

Review sets, queries and exports:

ToolMethodRisk
list-review-setsGET
get-review-setGET
create-review-setPOSTlow
add-to-review-setPOSTmedium
export-review-setPOSThigh
list-review-set-queriesGET
get-review-set-queryGET
create-review-set-queryPOSTlow
apply-tags-review-set-queryPOSTmedium

Operations:

ToolMethodRisk
list-case-operationsGET
get-case-operationGET

export-review-set is the court-admissible production path. Its exportOptions / exportStructure fields are Graph flagged enums and must be sent as comma-separated strings, not objects.

Azure AD permissions

Read-only (default)
AccessReview.Read.All
AdministrativeUnit.Read.All
AgentRegistration.Read.All
Agreement.Read.All
AiEnterpriseInteraction.Read.All
APIConnectors.Read.All
AppCatalog.Read.All
Application.Read.All
AppRoleAssignment.Read.All
AttackSimulation.Read.All
AuditLog.Read.All
BitlockerKey.Read.All
CallRecords.Read.All
Chat.ManageDeletion.All
Channel.ReadBasic.All
Chat.Read.All
ChatMember.Read.All
ChatMessage.Read.All
CloudPC.Read.All
ConsentRequest.Read.All
CopilotPolicySettings.Read
CopilotSettings-Internal.ReadWrite.All
CustomAuthenticationExtension.Read.All
CustomSecAttributeDefinition.Read.All
Device.Read.All
DeviceLocalCredential.Read.All
DeviceManagementApps.Read.All
DeviceManagementConfiguration.Read.All
DeviceManagementManagedDevices.Read.All
DeviceManagementRBAC.Read.All
DeviceManagementServiceConfig.Read.All
Directory.Read.All
Domain.Read.All
eDiscovery.Read.All
EntitlementManagement.Read.All
Exchange.ManageAsApp
Group.Read.All
GroupMember.Read.All
IdentityProvider.Read.All
IdentityRiskEvent.Read.All
IdentityRiskyServicePrincipal.Read.All
IdentityRiskyUser.Read.All
IdentityUserFlow.Read.All
InformationProtectionPolicy.Read.All
LifecycleWorkflows.Read.All
MailboxSettings.Read
OnlineMeetingArtifact.Read.All
OnlineMeetings.Read.All
OnPremDirectorySynchronization.Read.All
Organization.Read.All
Policy.Read.All
Printer.Read.All
ProtectionScopes.Compute.All
PrintConnector.Read.All
PrintJob.Read.All
PrivilegedAccess.Read.AzureADGroup
RecordsManagement.Read.All
Reports.Read.All
RoleAssignmentSchedule.Read.Directory
RoleEligibilitySchedule.Read.Directory
RoleManagement.Read.Directory
RoleManagementPolicy.Read.Directory
SecurityAlert.Read.All
SecurityEvents.Read.All
SecurityIdentitiesAccount.Read.All
SecurityIdentitiesAutoConfig.Read.All
SecurityIdentitiesHealth.Read.All
SecurityIdentitiesMigration.Read.All
SecurityIdentitiesSensors.Read.All
SecurityIncident.Read.All
ServiceHealth.Read.All
ServiceMessage.Read.All
SharePointTenantSettings.Read.All
Sites.Read.All
Sites.FullControl.All
SubjectRightsRequest.Read.All
Team.ReadBasic.All
TeamMember.Read.All
TeamsAppInstallation.ReadForTeam.All
TeamsTelephoneNumber.Read.All
TeamsUserConfiguration.Read.All
TeamworkAppSettings.Read.All
TeamworkDevice.Read.All
ThreatAssessment.Read.All
ThreatHunting.Read.All
ThreatIntelligence.Read.All
User.Invite.All
User.Read.All
UserAuthenticationMethod.Read.All
Write (incident response, device actions, CA policies, Teams, SharePoint, identity management)
AccessReview.ReadWrite.All
AdministrativeUnit.ReadWrite.All
Application.ReadWrite.All
Application.ReadWrite.OwnedBy
AppRoleAssignment.ReadWrite.All
AttackSimulation.ReadWrite.All
Channel.Create
Channel.Delete.All
CloudPC.ReadWrite.All
Device.ReadWrite.All
DeviceManagementConfiguration.ReadWrite.All
DeviceManagementManagedDevices.PrivilegedOperations.All
DeviceManagementManagedDevices.ReadWrite.All
DeviceManagementServiceConfig.ReadWrite.All
Directory.AccessAsUser.All
Domain.ReadWrite.All
eDiscovery.ReadWrite.All
EntitlementManagement.ReadWrite.All
Group.ReadWrite.All
GroupMember.ReadWrite.All
IdentityRiskyServicePrincipal.ReadWrite.All
IdentityRiskyUser.ReadWrite.All
LifecycleWorkflows.ReadWrite.All
Policy.ReadWrite.AuthenticationMethod
Policy.ReadWrite.ConditionalAccess
PrivilegedAccess.ReadWrite.AzureADGroup
RecordsManagement.ReadWrite.All
RoleAssignmentSchedule.ReadWrite.Directory
RoleEligibilitySchedule.ReadWrite.Directory
RoleManagement.ReadWrite.Directory
RoleManagementPolicy.ReadWrite.Directory
SecurityAlert.ReadWrite.All
SecurityIdentitiesActions.ReadWrite.All
SecurityIdentitiesAutoConfig.ReadWrite.All
SecurityIdentitiesMigration.ReadWrite.All
SecurityIdentitiesSensors.ReadWrite.All
SecurityIncident.ReadWrite.All
Sites.ReadWrite.All
Team.Create
Team.ReadWrite.All
TeamMember.ReadWrite.All
TeamsTelephoneNumber.ReadWrite.All
TeamworkAppSettings.ReadWrite.All
User.ReadWrite.All
UserAuthenticationMethod.ReadWrite.All

Remote HTTP deployment

Local HTTP mode
node dist/index.js \
  --transport http \
  --port 8080 \
  --allowed-clients "app-id-1,app-id-2"

The --allowed-clients flag is mandatory in HTTP mode. It validates incoming bearer tokens against Microsoft's JWKS endpoint (signature verification, audience, tenant, and client ID checks).

Docker
docker build -t ms365-admin-mcp .
docker run -p 8080:8080 \
  -e MS365_ADMIN_MCP_CLIENT_ID=... \
  -e MS365_ADMIN_MCP_CLIENT_SECRET=... \
  -e MS365_ADMIN_MCP_TENANT_ID=... \
  ms365-admin-mcp --allowed-clients "your-app-id"
Azure Container Apps

A Bicep template is provided in infra/main.bicep. It deploys:

  • User-Assigned Managed Identity (UAMI)
  • Key Vault (RBAC, purge protection, 90-day soft-delete)
  • Log Analytics workspace + Application Insights
  • Container App Environment
  • Container App using the UAMI, with MS365_ADMIN_MCP_KEYVAULT_URL wired to the vault
MY_OID=$(az ad signed-in-user show --query id -o tsv)

az deployment group create \
  --resource-group rg-mcp-admin \
  --template-file infra/main.bicep \
  --parameters baseName=ms365mcpprod \
               containerImage=your-acr.azurecr.io/ms365-admin-mcp:latest \
               kvAdminObjectIds="['$MY_OID']"

Seed the vault with ms365-admin-mcp-{client-id,tenant-id,client-secret} after deploy — see docs/HTTP_DEPLOYMENT.md.

Development

npm run dev              # Run with tsx (hot reload)
npm run generate         # Download OpenAPI spec + generate client
npm run build            # Build with tsup
npm run test             # Run vitest
npm run lint             # ESLint
npm run format           # Prettier
npm run verify           # Full pipeline (generate + lint + format + build + test)
npm run inspector        # MCP Inspector for interactive testing
Adding a new tool
  1. Add the endpoint entry in src/endpoints.json, with its section (the README inventory section its row goes under) and, for a write, its riskLevel. If that section is new, place it in every table of src/tool-partitions.ts
  2. Run npm run generate to regenerate the client
  3. The tool is automatically registered at startup by registerGraphTools()
  4. Run npm run verify to validate

Security

  • Read-only by default -- mutations require --allow-writes
  • Risk levels on write tools (critical/high/medium/low) with LLM-visible warnings
  • JWT signature verification via Microsoft JWKS (RS256) in HTTP mode
  • Mandatory authentication in HTTP mode (--allowed-clients required)
  • Rate limiting (100 req/min) on the MCP endpoint
  • Security headers (nosniff, DENY, no-store, CSP)
  • Non-root Docker user
  • Sensitive data redacted from logs

Acknowledgments

This project would not exist without Softeria/ms-365-mcp-server. Their work served as the foundation and inspiration for this server — in particular:

  • The endpoint-driven architecture (endpoints.json + auto-registration via graph-tools.ts)
  • The OpenAPI-based code generation pipeline (npm run generate → trimmed Graph spec + Zodios client)
  • The CLI ergonomics (presets, --list-tools, --list-permissions, --verify-login, MCP Inspector integration)
  • The read-only-by-default + --allow-writes safety model

This server diverges from Softeria's by targeting application permissions (client credentials via MSAL ConfidentialClientApplication) rather than delegated permissions, and by adding admin-specific capabilities — risk classification on write tools, JWT validation via Microsoft JWKS for HTTP mode, Azure Key Vault integration, and incident-response tooling.

Sincere thanks to the Softeria team and contributors for making their work available under an open license, and for setting a high bar for MCP server design in the Microsoft 365 ecosystem.

License

MIT — see LICENSE.

Frequently asked questions

What is Microsoft 365 Admin?

Microsoft 365 administration via Graph API application permissions (read-only by default).

How do I install Microsoft 365 Admin?

It runs on your machine. In Claude Code: claude mcp add microsoft-365-admin -e 'MS365_ADMIN_MCP_TENANT_ID=<MS365_ADMIN_MCP_TENANT_ID>' -e 'MS365_ADMIN_MCP_CLIENT_ID=<MS365_ADMIN_MCP_CLIENT_ID>' -e 'MS365_ADMIN_MCP_CLIENT_SECRET=<your ms365_admin_mcp_client_secret>' -e 'MS365_ADMIN_MCP_KEYVAULT_URL=<MS365_ADMIN_MCP_KEYVAULT_URL>' -e 'MS365_ADMIN_MCP_CLOUD_TYPE=<MS365_ADMIN_MCP_CLOUD_TYPE>' -e 'MS365_ADMIN_MCP_MAX_TOP=<MS365_ADMIN_MCP_MAX_TOP>' -e 'READ_ONLY=<READ_ONLY>' -e 'ENABLED_TOOLS=<ENABLED_TOOLS>' -- npx -y @okapi-ca/ms-365-admin-mcp-server@0.6.3. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Microsoft 365 Admin need an API key?

Yes. It expects MS365_ADMIN_MCP_TENANT_ID, MS365_ADMIN_MCP_CLIENT_ID, MS365_ADMIN_MCP_CLIENT_SECRET, which you set in its configuration.

Is Microsoft 365 Admin open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains Microsoft 365 Admin?

It is published by okapi-ca. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.