CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Microsoft 365 Admin

okapi-ca/ms-365-admin-mcp-server
4authSTDIOregistry active
Summary

A focused toolkit for Microsoft 365 administrators who need application-level access to Graph API without user interaction. Ships 622 read-only tools covering security monitoring, audit logs, identity management, Intune device policies, eDiscovery cases, Defender for Identity sensors, and Copilot usage analytics. Built for incident response and compliance workflows where you need client credentials, not delegated permissions. Write operations exist behind an explicit flag with risk classifications. Comes with playbooks for breach investigation, presets to scope tool availability by domain, and support for both Azure global and China clouds. If you're running security operations or quarterly access reviews at scale, this is the server to wire up.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

ms-365-admin-mcp-server

CI npm version License: MIT

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

  • 622 tools covering security, audit, identity, app credentials, guest users, Exchange, Intune (devices, apps, MAM, reports, 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 (recommended)

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.

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 @okapi-ca/ms-365-admin-mcp-server@latest 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)
--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 (515)

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 (10)

ToolMethodRisk
list-usersGET
get-userGET
list-user-membershipsGET
list-user-auth-methodsGET
list-user-devicesGET
create-userPOSThigh
update-userPATCHmedium
delete-userDELETEcritical
assign-user-licensePOSTmedium
reprocess-user-licensePOSTlow

Devices (2)

ToolMethod
list-devicesGET
get-deviceGET

Groups (8)

ToolMethodRisk
list-groupsGET
get-groupGET
list-group-membersGET
list-group-ownersGET
create-groupPOSTmedium
update-groupPATCHmedium
delete-groupDELETEcritical
add-group-memberPOSTmedium

Directory roles & PIM (7)

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

Administrative units (7)

ToolMethodRisk
list-administrative-unitsGET
get-administrative-unitGET
list-administrative-unit-membersGET
create-administrative-unitPOSTmedium
update-administrative-unitPATCHmedium
delete-administrative-unitDELETEhigh
add-administrative-unit-memberPOSTmedium

Conditional access (3)

ToolMethod
list-conditional-access-policiesGET
get-conditional-access-policyGET
list-named-locationsGET

Applications & app roles (8)

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

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 (6)

ToolMethodRisk
list-managed-devicesGET
get-managed-deviceGET
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 (3)

ToolMethod
list-device-configurationsGET
get-device-configurationGET
get-device-configuration-status-overviewGET

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 (6)

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
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

App consent requests (3)

ToolMethod
list-app-consent-requestsGET
get-app-consent-requestGET
list-user-consent-requestsGET

Incident response (11) -- 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
confirm-compromised-service-principalsPOSThigh
dismiss-risky-service-principalsPOSThigh
confirm-safe-usersPOSThigh
run-hunting-queryPOSTlow

Intune device remote actions (16) -- 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
clean-windows-devicePOSTcritical
logout-shared-apple-userPOSTmedium
delete-shared-apple-userPOSThigh
update-windows-device-accountPOSTmedium

Conditional Access CRUD (8) -- requires --allow-writes

ToolMethodRisk
list-conditional-access-templatesGET
get-conditional-access-policyGET
create-conditional-access-policyPOSThigh
update-conditional-access-policyPATCHhigh
delete-conditional-access-policyDELETEcritical
create-named-locationPOSTmedium
update-named-locationPATCHmedium
delete-named-locationDELETEhigh

Intune policies CRUD (6) -- requires --allow-writes

ToolMethodRisk
create-compliance-policyPOSTmedium
update-compliance-policyPATCHmedium
delete-compliance-policyDELETEhigh
create-device-configurationPOSTmedium
update-device-configurationPATCHmedium
delete-device-configurationDELETEhigh

eDiscovery (1)

ToolMethodRisk
list-ediscovery-casesGET

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 (6)

ToolMethodRisk
list-retention-labelsGET
list-file-plan-authoritiesGET
list-file-plan-categoriesGET
list-file-plan-citationsGET
list-file-plan-departmentsGET
list-file-plan-referencesGET

Teams administration (30)

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

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+ (2)

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+ (7)

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
list-threat-intel-host-pairsGET

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 (2)

ToolMethodRisk
get-copilot-admin-settingsGET
get-copilot-limited-modeGET

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 v2 (Purview) (12) -- writes require --allow-writes

ToolMethodRisk
get-ediscovery-caseGET
create-ediscovery-casePOSTmedium
update-ediscovery-casePATCHmedium
delete-ediscovery-caseDELETEcritical
close-ediscovery-casePOSTmedium
reopen-ediscovery-casePOSTmedium
list-ediscovery-custodiansGET
create-ediscovery-custodianPOSTmedium
apply-hold-ediscovery-custodianPOSThigh
remove-hold-ediscovery-custodianPOSThigh
list-ediscovery-searchesGET
create-ediscovery-searchPOSTmedium

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
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
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
  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.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Configuration

MS365_ADMIN_MCP_TENANT_ID*

Azure AD tenant ID (specific GUID, not 'common').

MS365_ADMIN_MCP_CLIENT_ID*

App registration client ID with the required application permissions.

MS365_ADMIN_MCP_CLIENT_SECRET*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.

Registryactive
Package@okapi-ca/ms-365-admin-mcp-server
TransportSTDIO
AuthRequired
UpdatedMay 21, 2026
View on GitHub