mcpField
M
Microsoft 365 Admin

Microsoft 365 Admin

ローカル
github.comセキュリティ181 週間前に更新

Microsoft 365 Admin について

Microsoft 365 Adminは、Microsoft Graphを通じてセキュリティ、ID、コンプライアンス、サービス管理を行う管理者向けMCPサーバーです。アプリケーション権限を使い、既定では読み取り専用で、明示的に有効化した書き込み操作にはリスク分類があります。

主な機能

  1. 01Microsoft 365管理ツール674種
  2. 02アプリケーション権限認証
  3. 03既定の読み取り専用モード
  4. 04書き込みツールのリスク分類
  5. 05ドメイン別ツールプリセット
  6. 06stdioとStreamableHTTPのトランスポート

活用シーン

  1. 01セキュリティアラートとインシデントの確認
  2. 02ID、サインイン、アクセス権の監査
  3. 03Intuneデバイスとコンプライアンスの管理
  4. 04Microsoft 365のサービスと監査データの調査

MCP 対応

stdioまたはStreamableHTTPで、Microsoft Graphの管理ツールをMCPクライアントに公開します。書き込みには--allow-writesの明示的な指定が必要で、プリセットやツールフィルターで提供範囲を絞れます。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

mcp.json · 共通設定
{
"mcpServers": {
"okapi-ca-ms-365-admin": {
"command": "npx",
"args": [
"-y",
"@okapi-ca/ms-365-admin-mcp-server"
],
"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": "<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>"
}
}
}
}
起動コマンドnpx -y @okapi-ca/ms-365-admin-mcp-server
設定が必要な環境変数
MS365_ADMIN_MCP_TENANT_IDAzure AD tenant ID (specific GUID, not 'common').
MS365_ADMIN_MCP_CLIENT_IDApp registration client ID with the required application permissions.
MS365_ADMIN_MCP_CLIENT_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_TYPECloud environment: 'global' (default) or 'china' (21Vianet).
MS365_ADMIN_MCP_MAX_TOPCap on the $top query parameter to limit result size.
READ_ONLYSet to 'true' or '1' to force read-only mode (default behavior; mutations require --allow-writes).
ENABLED_TOOLSRegex to filter the catalog of available tools.

ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。

パッケージ
npm@okapi-ca/ms-365-admin-mcp-server0.6.3

ツール

329

掲載時のツール一覧 · 2 週間前に更新

パラメーター型必須説明
topnumberいいえページサイズ(Graph $top)。応答がモデルのコンテキストに収まるよう、まず小さな値(5-15)を指定します。続きの行を取得するには、応答内の @odata.nextLink を使用します。
skipstringいいえskip
countstringいいえcount
expandstringいいえexpand
filterstringいいえOData $filter 式。例:status eq 'inProgress'
searchstringいいえsearch
selectstringいいえ返すフィールドをカンマ区切りで指定します。
orderbystringいいえorderby
excludeResponsebooleanいいえ完全な応答本文を除外し、成功または失敗のみを返します

詳細

ms-365-admin-mcp-server

CI npm version License: MIT

Graph API の アプリケーション権限(クライアント資格情報)を使用して Microsoft 365 を管理するための、Model Context Protocol(MCP)サーバーです。

Softeria/ms-365-mcp-server が先駆けたアーキテクチャとエンドポイント主導の設計に基づいて構築され、相互補完するものです。Softeria のサーバーはエンドユーザーの生産性向上シナリオ向けに委任アクセス許可を使用する一方、こちらはセキュリティ監視、ID 監査、インシデント対応、サービス正常性などの管理操作向けにアプリケーション権限を使用します。詳しくは以下の謝辞をご覧ください。

機能

  • セキュリティ、監査、ID、アプリの資格情報、ゲストユーザー、Exchange、Intune(デバイス、アプリ、MAM、レポート、設定カタログとエンドポイントセキュリティ(BitLocker、ウイルス対策、ファイアウォール、ASR)、暗号化レポート、Windows Update プロファイル、BitLocker と LAPS のローテーション、macOS プラットフォームスクリプト、macOS カスタム属性スクリプト、割り当てフィルター、修復、Windows PowerShell スクリプト、カスタムコンプライアンススクリプト)、ガバナンス(PIM、アクセスレビュー、エンタイトルメント、ライフサイクル)、コンプライアンス、脅威インテリジェンス、高度なハンティング、Defender for Identity(センサー、候補、移行、ID アカウント、監査ポリシー)、Microsoft 365 Copilot 管理(使用状況レポート、インタラクション履歴監査、AI ユーザー、会議のインサイト、エージェント登録、ポリシー設定)、カスタムセキュリティ属性、LAPS、ポリシー、レポート、インシデント対応、eDiscovery v3(ケース、カストディアン、非カストディアルデータソース、レビューセット、クエリ、エクスポート、操作)、Purview DSPM(保護スコープ)、イベントベースの保持トリガー、Teams オンライン会議の出席レポート(Application Access Policy を使用したアプリ専用アクセス)、削除済みチャットの復元(管理者向け復旧フロー)、Teams チャット調査の読み取り(トリアージには Chat.Read.All、裁判で証拠として採用できるデータの取得には eDiscovery v3)、Cloud PC、通話レコード、Universal Print、情報保護、SharePoint 管理、レコード管理を網羅する674 個のツール
  • アプリケーション権限(クライアント資格情報)を使用し、ユーザー操作は不要です
  • デフォルトでは読み取り専用です。書き込み操作には明示的な --allow-writes が必要です
  • 書き込みツールのリスク分類(低/中/高/重大)
  • ドメイン別(セキュリティ、監査、ID など)にツールを絞り込むプリセット
  • 2 種類のトランスポート:stdio(デフォルト)と HTTP(StreamableHTTP)
  • マルチクラウド:Microsoft グローバルおよび中国(21Vianet)
  • シークレット管理のための Key Vault サポート

ドキュメント

ドキュメント目的
docs/USE_CASES.mdサンプルプロンプトとツール一覧を含む、18 の一般的な管理シナリオ
docs/playbooks/セキュリティインシデント対応のエンドツーエンドのプレイブック
agent-skills/安全性のパターンを備えた、LLM エージェント(Claude Code など)向けのすぐに使えるスキル
docs/APP_REGISTRATION.mdAzure AD アプリの登録とアクセス許可への同意の手順
docs/HTTP_DEPLOYMENT.mdHTTP トランスポート、JWT 検証、Docker、Azure Container Apps
docs/AZURE_DEPLOYMENT_SECURITY.mdAzure の本番環境へのデプロイに関する脅威モデル、必須の制御、チェックリスト
docs/TROUBLESHOOTING.mdよくあるエラーと診断方法
docs/ARCHITECTURE.md内部アーキテクチャとコード生成パイプライン
docs/RISK_MODEL.md書き込みツールのリスク分類基準
CONTRIBUTING.md新しいツール、プリセット、修正の貢献方法
SECURITY.md脆弱性の報告と運用者向けのセキュリティ強化チェックリスト
CHANGELOG.mdリリース履歴

前提条件

  • Node.js >= 18
  • アプリケーションのアクセス許可(委任ではない)を持つ Azure AD アプリの登録
  • 特定のテナント ID(「common」ではない)

インストール

npm(推奨)
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
ソースから
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

設定

環境変数
変数必須説明
MS365_ADMIN_MCP_CLIENT_IDはいアプリ登録のクライアント ID
MS365_ADMIN_MCP_CLIENT_SECRETはいアプリ登録のクライアントシークレット
MS365_ADMIN_MCP_TENANT_IDはいAzure AD テナント ID(特定の値である必要があります)
MS365_ADMIN_MCP_CLOUD_TYPEいいえglobal(デフォルト)または china
MS365_ADMIN_MCP_KEYVAULT_URLいいえAzure Key Vault URL(環境変数より優先)
MS365_ADMIN_MCP_MAX_TOPいいえ$top クエリパラメーターの上限を設定し、結果サイズを制限
READ_ONLYいいえ読み取り専用を強制するには true/1(デフォルトの動作)
ENABLED_TOOLSいいえ利用可能なツールを絞り込む正規表現
MCP クライアントの設定(Claude Desktop など)
{
  "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 は同じ MCP プロトコルを使用しますが、設定の構成は異なります。mcpServers の代わりに servers を使い、type フィールドを明示し、シークレット入力のプロンプトには inputs を使います。すぐにコピーできるサンプルは .vscode/mcp.json.example にあります。これを .vscode/mcp.json にコピーすると、初回起動時に VS Code がテナント/クライアント/シークレットを尋ね、その後、シークレットストアに保存します(実際の mcp.json は gitignore の対象なので、解決済みのシークレットがリポジトリに含まれることはありません)。

最小限の stdio 設定:

{
  "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}",
      },
    },
  },
}

リモート HTTP でデプロイする場合は、"type": "http" と url フィールドを使います(VS Code 1.103+ は OAuth 2.0 Dynamic Client Registration をネイティブで処理します)。ネイティブのブラウザーフローを利用できない場合は、mcp-remote ブリッジを使います。どちらの形式もサンプルファイルを参照してください。

ツールは エージェントモード(GitHub Copilot Chat)に表示されます。VS Code ではツールごとに承認を求められます。上記の --preset フラグを使うと、カタログを管理しやすいサイズに保てます。ログを確認するには、Cmd/Ctrl+Shift+P → MCP: List Servers → Show Output を使います。

Claude.ai の画面におけるカタログサイズの上限

Claude.ai、Claude Desktop、クラウドセッションでは、各コネクターのツールに 1 MiB の入力スキーマ(コンパクトな JSON。ツール名と説明は含まれません)という固定の上限が適用されます。ツールはアルファベット順に登録され、上限に収まらないツールは通知なしに除外されます。Claude Code CLI には影響しません。この上限は公開されているドキュメントには記載されていません。

Mac とリンクされたクラウドセッションでは、claude-device ブリッジがすべてのローカル MCP サーバーを 1 つのコネクター(lcl-<server>-<tool>)経由で中継します。そのため、すべてのローカルサーバーがこの上限を共有し、このサーバーのツールはほとんどのローカルサーバーより後に並びます。

そのため、リクエストボディは浅いスキーマで公開されます(src/advertised-schema.ts)。エンティティ自身のフィールドとその説明を含め、ネストされたオブジェクトは自由形式のオブジェクトとして扱い、Read-only. フィールドは含めません。Graph がボディを検証し、サーバーは受信した内容をそのまま転送します。書き込みを有効にした場合、カタログが公開する入力スキーマは約 595 KB であり、768 KiB を超えると test/advertised-schema.test.ts がビルドに失敗します。

クラウドセッションで引き続きツールが表示されない場合は、このサーバーが公開する情報を減らす(読み取り専用モード、--preset、--enabled-tools)、使用していないローカルサーバーを無効にする、またはこのサーバーを独立したコネクターとして登録して専用の上限を割り当ててください。

リモート HTTP サーバー:device_code 認証(RFC 8628)

サーバーがリモートホスト(例:Azure Container Apps)で HTTP/OAuth モードで動作し、クライアントが mcp-remote 経由で接続する場合、標準のフローではブラウザーから localhost:14543/oauth/callback にアクセスする必要があります。それができない場合(macOS Platform SSO が WebKit フローを横取りする、Claude Code がヘッドレス Docker コンテナーで動作する、ユーザーがリモートの SSH 開発環境を使用しているなど)は、ms-365-admin-mcp-auth ブートストラップを使って、mcp-remote のトークンキャッシュにあらかじめトークンを登録してください。

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

このヘルパーは URL とユーザーコードを表示します。信頼できる 任意のデバイス(スマートフォン、別のノート PC など)でサインインすると、トークンが ~/.mcp-auth/mcp-remote-<version>/ に書き込まれます。その後、Claude Desktop/Claude Code は通常どおり mcp-remote を起動し、ブラウザーを開くことなくキャッシュ済みのトークンを見つけます。

Docker/リモート開発のパターンと終了コードのリファレンスについては、docs/TROUBLESHOOTING.md を参照してください。

使用方法

CLI オプション
--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
プリセット
# 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
プリセット説明
securityセキュリティアラート、インシデント、攻撃シミュレーション、脅威インテリジェンス
auditディレクトリ監査、サインイン、プロビジョニングログ、削除済みアイテム
healthサービスの正常性とメッセージセンター
reports使用状況レポート(Teams、Email、SharePoint、OneDrive、Mailbox、M365 Apps)
identityユーザー、グループ、ロール、デバイス、PIM、ゲストユーザー、外部 ID
exchangeExchange の管理(メッセージ追跡、メールボックス)
intune管理対象デバイス、コンプライアンス、構成、Autopilot、アプリ、RBAC
governanceアクセスレビュー、エンタイトルメント管理、ライフサイクルワークフロー、利用規約
complianceライセンス、Secure Score、Identity Protection、リスク検出、ポリシー
responseインシデント対応の書き込み操作(無効化、取り消し、確認、却下)
ediscoveryeDiscovery ケース(Microsoft Purview)
cloudpcCloud PC / Windows 365(プロビジョニング、イメージ、接続、設定、監査)
callrecordsTeams 通話記録
printUniversal Print(プリンター、共有、コネクタ、サービス、操作、タスク)
infoprotection情報保護(BitLocker 回復キー、脅威評価)
sharepointadminSharePoint テナントの管理設定
retentionレコード管理(保持ラベル、ファイル計画メタデータ)
all利用可能なすべてのツール
資格情報を確認する
node dist/index.js --verify-login

利用可能なツール(674)

セキュリティ(11)
ツールメソッドリスク
list-security-alertsGET
get-security-alertGET
update-security-alertPATCH中
list-security-incidentsGET
get-security-incidentGET
update-security-incidentPATCH中
list-attack-simulationsGET
get-attack-simulationGET
create-attack-simulationPOST高
update-attack-simulationPATCH中
delete-attack-simulationDELETE中
監査ログと削除済みアイテム(5)
ツールメソッド
list-directory-auditsGET
list-sign-insGET
list-provisioning-logsGET
list-deleted-usersGET
list-deleted-groupsGET
サービスの正常性(3)
ツールメソッド
list-service-healthGET
list-service-issuesGET
list-service-messagesGET
使用状況レポート(8)
ツールメソッド
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
ユーザー(9)
ツールメソッドリスク
list-usersGET
get-userGET
list-user-membershipsGET
list-user-auth-methodsGET
list-user-devicesGET
create-userPOST高
delete-userDELETE重大
assign-user-licensePOST中
reprocess-user-licensePOST低

汎用の update-user はありません。このサーバーが /users/{id} に対して公開している唯一の PATCH は disable-user-account(インシデント対応を参照)で、意図的に機能を限定しています。設定するのは accountEnabled のみで、それ以外は変更しません。

デバイス(2)
ツールメソッド
list-devicesGET
get-deviceGET
グループ(11)
ツールメソッドリスク
list-groupsGET
get-groupGET
list-group-membersGET
list-group-ownersGET
create-groupPOST中
update-groupPATCH中
delete-groupDELETE重大
add-group-memberPOST中
remove-group-memberDELETE中
add-group-ownerPOST高
remove-group-ownerDELETE高

remove-group-member、add-group-owner、remove-group-owner は事前チェックのガードレールを実行します。オンプレミスと同期されたグループでの操作、動的グループからのメンバー削除、およびグループの唯一の所有者の削除を拒否します。docs/ARCHITECTURE.mdを参照してください。

ディレクトリロールと PIM(9)
ツールメソッドリスク
list-directory-rolesGET
list-role-membersGET
list-role-assignmentsGET
list-role-definitionsGET
list-pim-eligible-assignmentsGET
list-pim-active-assignmentsGET
add-directory-role-memberPOST重大
delete-role-assignmentDELETE重大
remove-directory-role-memberDELETE重大

使用するのは delete-role-assignment です。list-role-assignments に $filter=principalId eq '{user-id}' を指定すれば、必要な割り当て ID が返されます。remove-directory-role-member は、従来の方法でアクティブ化されたロールに対応します。どちらのツールも、テナントで最後に残ったアクティブなグローバル管理者に対する操作は例外なく拒否します。これは、どのパラメーターでも上書きできないロックアウト防止のガードレールです。

管理単位(8)
ツールメソッドリスク
list-administrative-unitsGET
get-administrative-unitGET
list-administrative-unit-membersGET
create-administrative-unitPOST中
update-administrative-unitPATCH中
delete-administrative-unitDELETE高
add-administrative-unit-memberPOST中
remove-administrative-unit-memberDELETE高
条件付きアクセス(3)
ツールメソッド
list-conditional-access-policiesGET
get-conditional-access-policyGET
list-named-locationsGET
アプリケーションとアプリのロール(11)
ツールメソッドリスク
list-applicationsGET
list-service-principalsGET
list-oauth2-grantsGET
list-user-app-role-assignmentsGET
list-sp-app-role-assignmentsGET
update-applicationPATCH高
delete-applicationDELETE重大
update-service-principalPATCH高
delete-oauth2-grantDELETE高
delete-sp-app-role-assignmentDELETE高
delete-user-app-role-assignmentDELETE高

不正な同意付与への対処には、delete-oauth2-grant を使用します。list-oauth2-grants で該当する付与を特定し、これを取り消します。consentType: AllPrincipals の付与を取り消すと、アプリの委任アクセスがすべてのユーザーについて一度に無効になります。影響範囲を事前に確認し、既存のセッションは同意を取り消しても終了しないため、revoke-user-sessions も併用してください。

アプリの資格情報と所有者(7)
ツールメソッド
get-applicationGET
list-application-ownersGET
list-app-federated-credentialsGET
get-app-federated-credentialGET
get-service-principalGET
list-service-principal-ownersGET
list-sp-delegated-permissionsGET
アプリ管理ポリシー(2)
ツールメソッド
list-app-management-policiesGET
get-app-management-policyGET
組織とドメイン(4)
ツールメソッドリスク
get-organizationGET
list-domainsGET
create-domainPOST高
verify-domainPOST中
ライセンス(2)
ツールメソッド
list-subscribed-skusGET
get-subscribed-skuGET
セキュアスコア(4)
ツールメソッド
list-secure-scoresGET
get-secure-scoreGET
list-secure-score-controlsGET
get-secure-score-controlGET
ID 保護とリスク検出(7)
ツールメソッド
list-risky-usersGET
get-risky-userGET
list-risky-user-historyGET
list-risky-service-principalsGET
get-risky-service-principalGET
list-risk-detectionsGET
get-risk-detectionGET
セキュリティとアクセスのポリシー(13)
ツールメソッドリスク
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-policyPOST高
update-auth-strength-policyPATCH高
delete-auth-strength-policyDELETE高
get-cross-tenant-access-policyGET
list-cross-tenant-partnersGET
change-user-passwordPOST高
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
デバイス構成 (4)
ツールメソッド
list-device-configurationsGET
get-device-configurationGET
get-device-configuration-status-overviewGET
list-device-configuration-device-statusesGET
設定カタログとエンドポイント セキュリティ (6)

すべての最新のエンドポイント セキュリティ ポリシー(ディスク暗号化/BitLocker、ウイルス対策、ファイアウォール、攻撃対象領域の縮小、EDR、アカウント保護)を含む、設定カタログのポリシーです。Graph beta を対象とします — configurationPolicies に v1.0 相当のものはありません。2 つのレポートアクションは読み取りのみを行う POST です。他の Intune レポートと同様に、--allow-writes が必要です。

ツールメソッドリスク
list-configuration-policiesGET
get-configuration-policyGET
list-configuration-policy-settingsGET
list-configuration-policy-templatesGET
get-configuration-policy-device-statusPOST低
get-configuration-policy-device-summaryPOST低
エンドポイント セキュリティのインテント(レガシーテンプレート) (4)

設定カタログへの移行前に作成された、テンプレートベースのエンドポイント セキュリティ ポリシーです。Graph beta を対象とします。 エンドポイント セキュリティの監査では、これらと設定カタログの両方を対象にする必要があります。

ツールメソッド
list-intentsGET
get-intentGET
list-intent-device-statesGET
list-intent-templatesGET
デバイスの暗号化 (1)

Intune の暗号化レポートです。準備状況、状態、TPM バージョン、および各デバイスに適用された BitLocker/FileVault ポリシーを確認できます。Graph beta を対象とします。

ツールメソッド
list-managed-device-encryption-statesGET
Windows Update プロファイル (3)

機能更新プログラムと品質更新プログラムのプロファイルです。デバイスの Windows Update for Business リング(リング自体はデバイス構成です)の延期設定を上書きします。Graph beta を対象とします。

ツールメソッド
list-windows-feature-update-profilesGET
list-windows-quality-update-profilesGET
list-windows-quality-update-policiesGET
macOS プラットフォーム スクリプト (6)

管理対象の macOS デバイスに展開される Intune シェルスクリプトです。Graph beta を対象とします(/beta/deviceManagement/deviceShellScripts)— Microsoft はこのエンドポイントを v1.0 に昇格したことがありません。DeviceManagementScripts.ReadWrite.All が必要です。

ツールメソッドリスク
list-device-shell-scriptsGET
get-device-shell-scriptGET
create-device-shell-scriptPOST中
update-device-shell-scriptPATCH中
delete-device-shell-scriptDELETE高
assign-device-shell-scriptPOST中

注:

  • scriptContent は、LF 改行のスクリプトを厳密な base64(URL セーフではありません)でエンコードしたものです。CRLF にすると、Mac での実行に失敗します。
  • ユーザーセッションとやり取りするスクリプト(例:System Events にアクセスする osascript)には、runAsAccount=user が必要です。
  • assign-device-shell-script は既存の割り当てをすべて置き換えます。追加ではありません。他の割り当てを削除せずにグループを追加するには、まず現在の割り当てを GET し、新しいターゲットを追加してから、結合したリスト全体を POST してください。
  • デフォルトでは、get-device-shell-script は scriptContent を返しません。base64 の本文を取得するには、$select=id,displayName,scriptContent,... を渡してください。
Intune Remediations / Proactive Remediations(8)

Windows 10/11 の Azure AD 参加デバイス向けの、検出用 PowerShell スクリプトと修復用 PowerShell スクリプトのペアです。Graph beta を対象とします(/beta/deviceManagement/deviceHealthScripts)。DeviceManagementScripts.ReadWrite.All が必要です。

ツールメソッドリスク
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

注意事項:

  • detectionScriptContent と remediationScriptContent はどちらも base64 エンコードされた PowerShell です。スクリプトを UTF-8 でエンコードしてから base64 にしてください。
  • 検出スクリプトは、準拠している場合は終了コード 0、修復が必要な場合は 1 を返します。修復スクリプトは、検出スクリプトが 1 を返した場合にのみ実行されます。
  • assign-device-health-script は既存の割り当てをすべて 置き換えます。スケジュールには、毎日、毎時、1 回限りを指定できます。検出のみの展開では、runRemediationScript: false を設定してください。
  • デフォルトでは、get-device-health-script はスクリプト本体を返しません。$select=id,displayName,detectionScriptContent,remediationScriptContent,... を渡してください。
  • Windows の「検証+修正」ユースケース(CIS のハードニング、エージェントのインストール検証、サービスの状態など)では、deviceShellScripts の最新の代替手段です。
Assignment filters(5)

Entra グループのサブセットにポリシー/アプリの割り当てを適用する動的メンバーシップフィルターです。Graph beta を対象とします(/beta/deviceManagement/assignmentFilters)。DeviceManagementConfiguration.ReadWrite.All が必要です。

ツールメソッドリスク
list-assignment-filtersGET
get-assignment-filterGET
create-assignment-filterPOSTmedium
update-assignment-filterPATCHmedium
delete-assignment-filterDELETEhigh

注意事項:

  • ルール構文はデバイスのプロパティに対する KQL に似ています。例:macOS Sonoma のみの場合は (device.osVersion -startsWith "14")、企業所有デバイスの場合は (device.deviceOwnership -eq "Corporate") です。
  • 演算子:-eq、-ne、-startsWith、-contains、-in、-matches。-and/-or で結合します。
  • フィルターは deviceConfigurations/mobileApps/deviceCompliancePolicies の割り当てで参照します(ユーザーには割り当てません。まずグループに割り当て、次にフィルターを追加して対象を絞り込みます)。
  • assignmentFilterManagementType:デバイスを対象とする割り当てでは devices、アプリを対象とする割り当てでは apps を指定します(プロパティの一部は異なります)。
  • 使用中のフィルターを削除すると、依存する割り当ては通知なく「グループのすべてのメンバー」に戻ります。削除前に割り当てを監査してください。
macOS カスタム属性シェルスクリプト(6)

Intune のシェルスクリプトで、標準出力が各デバイスの名前付きカスタム属性として保存されます。インベントリデータ(FileVault、Gatekeeper、暗号化フラグ、カスタムマーカー)の表示や、動的グループフィルターの設定に便利です。Graph beta を対象とします(/beta/deviceManagement/deviceCustomAttributeShellScripts)。DeviceManagementScripts.ReadWrite.All が必要です。

ツールメソッドリスク
list-device-custom-attribute-shell-scriptsGET
get-device-custom-attribute-shell-scriptGET
create-device-custom-attribute-shell-scriptPOST中
update-device-custom-attribute-shell-scriptPATCH中
delete-device-custom-attribute-shell-scriptDELETE高
assign-device-custom-attribute-shell-scriptPOST中

注意事項:

  • スクリプトの標準出力は、各デバイスの customAttributeName に保存される値になります。
  • customAttributeType は、Intune が標準出力を解析する方法を制御します。integer、string、または dateTime(ISO 8601)を指定します。
  • scriptContent は、LF 改行を使用したスクリプトの厳密な base64 エンコードです。CRLF にすると Mac での実行に失敗します。
  • デプロイ後に customAttributeName または customAttributeType を変更すると、以前のキーを参照する後続の動的グループや割り当てフィルターが機能しなくなります。先に参照先を監査してください。
  • スクリプトを削除しても、デバイスレコードに以前収集された属性値は消去されません。
Windows PowerShell スクリプト(deviceManagementScripts)(6)

管理対象の Windows 10/11 デバイスにデプロイする、1 回限りの PowerShell スクリプトです。割り当てごとにデバイスあたり 1 回実行され、失敗すると再試行されます。検出と修正のパターンには、代わりに deviceHealthScripts(Remediations)を使用してください。Graph beta を対象とします(/beta/deviceManagement/deviceManagementScripts)。DeviceManagementScripts.ReadWrite.All が必要です。

ツールメソッドリスク
list-device-management-scriptsGET
get-device-management-scriptGET
create-device-management-scriptPOST中
update-device-management-scriptPATCH中
delete-device-management-scriptDELETE高
assign-device-management-scriptPOST中

注意事項:

  • scriptContent は、UTF-8 の PowerShell を base64 エンコードしたものです。
  • 割り当て後、次回の Intune Management Extension の同期時にデバイスごとに 1 回だけ実行されます。正常に実行された後は再実行されません(繰り返し実行するパターンには deviceHealthScripts を使用してください)。
  • scriptContent を更新しても、すでに実行に成功したデバイスでは再実行されません。再実行させるには、削除してから再作成してください。
  • enforceSignatureCheck=true を指定すると、コード署名済みスクリプトが必要になります(本番環境では推奨)。
  • runAs32Bit=true を指定すると、64 ビット版 Windows で 32 ビット版 PowerShell を強制的に実行します(必要となることはまれです)。
Windows のカスタムコンプライアンススクリプト(deviceComplianceScripts)(6)

STDOUT に JSON オブジェクトを出力し、関連付けられた windows10CustomComplianceConfiguration ポリシーで宣言されたルールに照らして評価される PowerShell スクリプトです。組織固有のコンプライアンスシグナルに使用します。組み込みの BitLocker/Defender/ファイアウォールのチェックでは対応できない場合に利用できます。Graph beta を対象とします(/beta/deviceManagement/deviceComplianceScripts)。DeviceManagementScripts.ReadWrite.All が必要です。

ツールメソッドリスク
list-device-compliance-scriptsGET
get-device-compliance-scriptGET
create-device-compliance-scriptPOSTmedium
update-device-compliance-scriptPATCHmedium
delete-device-compliance-scriptDELETEhigh
assign-device-compliance-scriptPOSTmedium

メモ:

  • detectionScriptContent は STDOUT に JSON オブジェクトを出力する必要があります(例:ConvertTo-Json -Compress @{BitLockerEnabled=$true;TpmReady=$true})。
  • スクリプトだけではコンプライアンスに影響しません。一致するルールを含む windows10CustomComplianceConfiguration ポリシーも作成する必要があります。
  • JSON キーを変更し、リンクされたポリシーのルールを更新しないと、コンプライアンス評価がひそかに機能しなくなります。
  • 使用中のスクリプトを削除すると、次回のデバイスチェックイン時に、参照しているコンプライアンスポリシーの評価が失敗します。
  • 割り当ての形式は deviceHealthScriptAssignment を再利用します(コンプライアンススクリプトには修復スクリプトとのペアがないため、runRemediationScript: false を設定してください)。
登録と Autopilot(10)
ツールメソッドリスク
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
検出されたアプリ(3)
ツールメソッド
list-detected-appsGET
get-detected-appGET
list-detected-app-devicesGET
Intune の RBAC と構成(7)
ツールメソッド
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 のコネクターと更新プログラム(3)
ツールメソッド
get-intune-conditional-access-settingsGET
list-mtd-connectorsGET
list-ios-update-statusesGET
デバイスカテゴリ(1)
ツールメソッド
list-device-categoriesGET
アクセスレビュー(5)
ツールメソッド
list-access-review-definitionsGET
get-access-review-definitionGET
list-access-review-instancesGET
get-access-review-instanceGET
list-access-review-decisionsGET
エンタイトルメント管理(7)
ツールメソッド
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
ライフサイクルワークフロー(3)
ツールメソッド
list-lifecycle-workflowsGET
get-lifecycle-workflowGET
list-lifecycle-task-definitionsGET
グループ向け PIM(2)
ツールメソッド
list-pim-group-assignment-schedulesGET
list-pim-group-eligibility-schedulesGET
利用規約(3)
ツールメソッド
list-terms-of-use-agreementsGET
get-terms-of-use-agreementGET
list-terms-of-use-acceptancesGET
アプリの同意要求(3)
ツールメソッド
list-app-consent-requestsGET
get-app-consent-requestGET
list-user-consent-requestsGET
インシデント対応(17)-- --allow-writes が必要です
ツールメソッドリスク
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

認証方法コレクションごとに削除ツールが1つあります。IDはコレクションごとに固有で、相互に置き換えることはできないためです。最初に list-user-auth-methods を実行し、@odata.type に基づいて適切なツールとIDを選んでください。MFAが必須で、その認証方法がユーザーに残された唯一のMFA要素である場合、Graphは削除を拒否します。

Intune デバイスのリモート操作(18) -- --allow-writes が必要です
ツールメソッドリスク
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
条件付きアクセスの CRUD(7) -- --allow-writes が必要です
ツールメソッドリスク
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 ポリシーの CRUD(8) -- --allow-writes が必要です
ツールメソッドリスク
create-compliance-policyPOSTmedium
update-compliance-policyPATCHmedium
assign-compliance-policyPOSThigh
delete-compliance-policyDELETEhigh
create-device-configurationPOSTmedium
update-device-configurationPATCHmedium
assign-device-configurationPOSThigh
delete-device-configurationDELETEhigh
設定カタログとエンドポイントセキュリティの CRUD(4) -- --allow-writes が必要です

Graph beta を対象とします。 DeviceManagementConfiguration.ReadWrite.All が必要です。assign-configuration-policy は割り当てリスト全体を置き換えます。

ツールメソッドリスク
create-configuration-policyPOSTmedium
update-configuration-policyPATCHmedium
delete-configuration-policyDELETEhigh
assign-configuration-policyPOSThigh
エンドポイントセキュリティインテントの CRUD(4) -- --allow-writes が必要です

Graph beta を対象とします。 DeviceManagementConfiguration.ReadWrite.All が必要です。assign-intent は割り当てリスト全体を置き換えます。

ツールメソッドリスク
update-intentPATCHmedium
update-intent-settingsPOSTmedium
delete-intentDELETEhigh
assign-intentPOSThigh
OneDrive / ユーザードライブ(DSAR 列挙)(4)

データ主体アクセス要求に対応するため、ユーザーの個人用ドライブを読み取り専用でたどります。コンテンツのバイトデータは公開されず、メタデータとダウンロード URL が返されます。

ツールメソッドリスク
get-user-driveGET
get-drive-rootGET
list-drive-childrenGET
get-drive-itemGET
Purview DSPM(保護スコープ)(2)
ツールメソッドリスク
get-data-security-governance-rootGET
compute-protection-scopesPOSTlow

compute-protection-scopes は POST ですが、変更ではなく計算を行うため、リスク階層は low です。それでも --allow-writes が必要です。

Teams オンライン会議の出席状況(4)

特定ユーザーの会議に関する出席状況レポートです。アプリ専用アクセスには、テナントで Application Access Policy を設定し、Set-CsApplicationAccessPolicy を使用してサービスプリンシパルごとに付与する必要があります。設定しない場合、Graph のアクセス許可にかかわらず、Graph は 403 を返します。

ツールメソッドリスク
get-user-online-meetingGET
list-user-meeting-attendance-reportsGET
get-user-meeting-attendance-reportGET
list-user-meeting-attendance-recordsGET
Teams の削除済みチャット(3)
ツールメソッドリスク
list-deleted-chatsGET
get-deleted-chatGET
undo-delete-chatPOSTmedium

ユーザーが削除したチャットを管理者が復元するためのフローです。保持期間は Microsoft によって決められており、ここでは設定できません。

Teams チャットの調査用読み取り(5)

Chat.Read.All を使用して、ユーザーのチャットをトリアージするための読み取りです。法廷で証拠として採用できる本番用途には、代わりに eDiscovery ツールを使用してください。これらの読み取りには証拠保全の連鎖がありません。

ツールメソッドリスク
list-user-chatsGET
get-chatGET
list-chat-membersGET
list-chat-messagesGET
get-chat-messageGET
Teams 通話レコード(11)
ツールメソッド
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)
ツールメソッドリスク
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)
ツールメソッドリスク
list-printersGET
list-print-sharesGET
list-print-connectorsGET
list-print-servicesGET
list-print-operationsGET
list-print-task-definitionsGET
情報保護と秘密度ラベル(7)
ツールメソッド
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 管理(25)
ツールメソッドリスク
get-sharepoint-settingsGET
list-sharepoint-sitesGET
get-sharepoint-siteGET
update-sharepoint-sitePATCH中
list-site-drivesGET
get-site-default-driveGET
list-site-listsGET
get-site-listGET
create-site-listPOST低
update-site-listPATCH低
delete-site-listDELETE高
list-site-list-itemsGET
create-site-list-itemPOST低
update-site-list-itemPATCH低
delete-site-list-itemDELETE中
list-site-list-columnsGET
list-site-columnsGET
list-site-content-typesGET
list-site-permissionsGET
get-site-permissionGET
create-site-permissionPOST中
update-site-permissionPATCH中
delete-site-permissionDELETE高
get-site-analyticsGET
list-site-subsitesGET
レコード管理(9)
ツールメソッドリスク
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-eventPOST中
get-retention-event-typeGET
create-retention-event-typePOST中

retentionLabels 自体の一覧表示や読み取りは公開されていません。Microsoft Graph はアプリケーション権限での操作をサポートしていないためです。その場合は、委任アクセスまたは Security & Compliance PowerShell を使用してください。list-retention-events はセキュリティの高度な機能にあります。

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)

Graph を介した Microsoft Defender for Identity(DfI)管理の全機能をカバーします。センサー、センサー候補(自動検出)、センサーの統合 Defender XDR アーキテクチャへの移行、ID アカウント(AD オンプレミス/Okta 向けの緊急時用 invokeAction を含む)、監査ポリシーの適用、正常性アラートが含まれます。ほとんどのエンドポイントは Graph v1.0 です。sensorMigration のみベータ版です。

ツールメソッドリスク
list-identity-health-issuesGET
get-identity-health-issueGET
list-sensor-health-issuesGET
get-sensor-health-issueGET
list-identity-sensorsGET
get-identity-sensorGET
update-identity-sensorPATCH中
get-sensor-deployment-access-keyGET
get-sensor-deployment-package-uriGET
regenerate-sensor-deployment-access-keyPOST高
list-sensor-candidatesGET
get-sensor-candidateGET
get-sensor-candidate-activation-configGET
update-sensor-candidate-activation-configPATCH中
activate-sensor-candidatesPOST中
list-sensor-migrationsGET
get-sensor-migrationGET
migrate-sensorsPOST高
get-identity-security-settingsGET
get-auto-auditing-configGET
update-auto-auditing-configPATCH中
list-identity-accountsGET
get-identity-accountGET
invoke-identity-account-actionPOST重大

注:

  • invoke-identity-account-action は最も影響の大きい書き込み操作です。アカウントのソースシステム(AD オンプレミス、Okta)で、ID 対応アクション(disable、enable、forcePasswordReset、revokeAllSessions、requireUserToSignInAgain、markUserAsCompromised)を実行します。アクションとプロバイダーの互換性:AD と Okta では disable/enable、AD のみでは forcePasswordReset、Okta のみでは revokeAllSessions を使用できます。
  • regenerate-sensor-deployment-access-key は以前のキーを直ちに無効にします。実行前に、新しいセンサーを展開する担当者と調整してください。
  • migrate-sensors は、統合 Defender XDR への移行中に対象 DC のセンサーサービスを再起動します。一時的に(数分程度)キャプチャーが途切れます。本番 DC ではメンテナンス時間帯を設定してください。ベータ版のみです。
  • activate-sensor-candidates は、デプロイアクセスキーのフローを使用して、検出されたホストへのセンサーのインストールを開始します。先に get-sensor-candidate で確認してください。誤った serverId を指定すると、別のホストにインストールされます。
  • update-auto-auditing-config で enabled=true を設定すると、DfI は各センサーホストに推奨される Windows の詳細監査ポリシーを適用します(次回のハートビート時にローカル管理者による上書きを元に戻します)。本番環境での使用を推奨します。

v0.10.0/0.11.1 以降に必要となった新しい Graph 権限(アプリ登録で同意が必要です):

  • SecurityIdentitiesSensors.Read.All + SecurityIdentitiesSensors.ReadWrite.All(センサー管理)
  • SecurityIdentitiesAutoConfig.Read.All + SecurityIdentitiesAutoConfig.ReadWrite.All(autoAuditingConfiguration)
  • SecurityIdentitiesAccount.Read.All(identityAccounts の list/get)
  • SecurityIdentitiesActions.ReadWrite.All(identityAccounts の invokeAction — 緊急時用)
  • SecurityIdentitiesMigration.Read.All + SecurityIdentitiesMigration.ReadWrite.All(sensorMigration、ベータ版)
脅威インテリジェンス+(6)
ツールメソッドリスク
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
レポート+(5)
ツールメソッドリスク
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 管理(15)

設定とポリシー:

ツールメソッドリスク
get-copilot-admin-settingsGET
get-copilot-limited-modeGET
list-copilot-policy-settingsGET
get-copilot-policy-settingGET

使用状況レポート:

ツールメソッドリスク
get-copilot-usage-user-detailGET
get-copilot-user-count-summaryGET
get-copilot-user-count-trendGET

インタラクション履歴の監査、AI ユーザー、会議のインサイト:

ツールメソッドリスク
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

エージェント登録:

ツールメソッドリスク
get-copilot-agent-registrationGET

get-all-copilot-interactions は、テナント内のすべてのエンタープライズ Copilot のインタラクション(プロンプトと応答)を返します。出力は規制対象の個人データとして取り扱ってください。

ディレクトリ+(5)
ツールメソッドリスク
list-attribute-setsGET
list-custom-security-attributesGET
list-device-local-credentialsGET
list-federation-configurationsGET
list-on-premises-syncGET
アプリケーションの資格情報と所有者の CRUD(11)-- --allow-writes が必要
ツールメソッドリスク
create-applicationPOST高
add-application-passwordPOST高
remove-application-passwordPOST高
add-application-keyPOST高
remove-application-keyPOST高
add-application-ownerPOST高
remove-application-ownerDELETE高
create-app-federated-credentialPOST高
update-app-federated-credentialPATCH高
delete-app-federated-credentialDELETE高
set-application-verified-publisherPOST中
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
アクセスレビューの CRUD とアクション(8) -- --allow-writes が必要です
ツールメソッドリスク
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) -- 書き込みには --allow-writes が必要です

ケースと検索:

ツールメソッドリスク
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

カストディアン:

ツールメソッドリスク
list-ediscovery-custodiansGET
get-ediscovery-custodianGET
create-ediscovery-custodianPOSTmedium
apply-hold-ediscovery-custodianPOSThigh
remove-hold-ediscovery-custodianPOSThigh
release-ediscovery-custodianPOSTmedium
update-ediscovery-custodian-indexPOSTlow

カストディアン以外のデータソース:

ツールメソッドリスク
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

レビューセット、クエリ、エクスポート:

ツールメソッドリスク
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

操作:

ツールメソッドリスク
list-case-operationsGET
get-case-operationGET

export-review-set は、裁判で証拠として認められる形式でデータを出力するためのパスです。exportOptions / exportStructure フィールドは Graph のフラグ付き列挙型であり、オブジェクトではなく、カンマ区切りの文字列として送信する必要があります。

Azure AD のアクセス許可

読み取り専用(デフォルト)
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
書き込み(インシデント対応、デバイス操作、CA ポリシー、Teams、SharePoint、ID 管理)
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

リモート HTTP デプロイ

ローカル HTTP モード
node dist/index.js \
  --transport http \
  --port 8080 \
  --allowed-clients "app-id-1,app-id-2"

HTTP モードでは、--allowed-clients フラグが必須です。Microsoft の JWKS エンドポイントに照らして受信したベアラートークンを検証します(署名検証、audience、テナント、クライアント ID のチェック)。

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

infra/main.bicep に Bicep テンプレートが用意されています。次のリソースをデプロイします。

  • ユーザー割り当てマネージド ID(UAMI)
  • Key Vault(RBAC、消去保護、90 日間のソフト削除)
  • Log Analytics ワークスペース + Application Insights
  • Container App Environment
  • UAMI を使用し、MS365_ADMIN_MCP_KEYVAULT_URL が Key Vault に設定された Container App
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']"

デプロイ後、Key Vault に ms365-admin-mcp-{client-id,tenant-id,client-secret} を登録してください。docs/HTTP_DEPLOYMENT.md を参照してください。

開発

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
新しいツールの追加
  1. src/endpoints.json にエンドポイントの項目を追加し、section(README の一覧で項目を追加するセクション)と、書き込みの場合は riskLevel を指定します。そのセクションが新しい場合は、src/tool-partitions.ts のすべてのテーブルに追加します
  2. npm run generate を実行してクライアントを再生成します
  3. registerGraphTools() によって、ツールは起動時に自動登録されます
  4. npm run verify を実行して検証します

セキュリティ

  • デフォルトで読み取り専用 -- 変更操作には --allow-writes が必要です
  • 書き込みツールにリスクレベル(critical/high/medium/low)を設定し、LLM に表示される警告を付けます
  • HTTP モードで Microsoft JWKS(RS256)を介して JWT 署名を検証します
  • HTTP モードでは認証が必須です(--allowed-clients が必要)
  • MCP エンドポイントでレート制限(100 req/min)を実施します
  • セキュリティヘッダー(nosniff、DENY、no-store、CSP)
  • Docker の非 root ユーザー
  • ログから機密データをマスキングします

謝辞

このプロジェクトは、Softeria/ms-365-mcp-server がなければ実現しませんでした。同プロジェクトの取り組みは、このサーバーの基盤となり、着想の源にもなりました。特に次の点が挙げられます。

  • エンドポイント駆動型アーキテクチャ(endpoints.json + graph-tools.ts による自動登録)
  • OpenAPI ベースのコード生成パイプライン(npm run generate → Graph 仕様の縮小 + Zodios クライアント)
  • CLI の使いやすさ(プリセット、--list-tools、--list-permissions、--verify-login、MCP Inspector との統合)
  • デフォルトで読み取り専用 + --allow-writes の安全モデル

このサーバーは、委任されたアクセス許可ではなくアプリケーションのアクセス許可(MSAL の ConfidentialClientApplication を介したクライアント資格情報)を対象としている点に加え、書き込みツールのリスク分類、HTTP モード用の Microsoft JWKS を介した JWT 検証、Azure Key Vault との統合、インシデント対応ツールなど、管理者向けの機能を追加している点で Softeria のプロジェクトとは異なります。

オープンライセンスで成果を公開し、Microsoft 365 エコシステムにおける MCP サーバー設計の高い水準を示してくださった Softeria チームと貢献者の皆様に、心より感謝します。

ライセンス

MIT — LICENSE を参照してください。

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。