intune-mcp-write
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@intune-mcp-writeAdd user jdoe@contoso.com to the VPN Users group"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
intune-mcp-write
MCP server providing read-write access to Microsoft Intune device properties and group memberships via the Microsoft Graph API. Allows Claude (or any MCP client) to manage devices, update properties, trigger syncs, and modify group membership.
Prerequisites
Node.js >= 18
An Azure AD (Entra ID) app registration with delegated permissions
Related MCP server: Microsoft 365 Core MCP Server
Setup
1. Register the Azure AD App
Create a public client app in Entra ID with these delegated permissions:
DeviceManagementManagedDevices.ReadWrite.AllDeviceManagementManagedDevices.PrivilegedOperations.AllDevice.Read.AllGroupMember.ReadWrite.AllDirectory.Read.AllUser.Read.All
Grant admin consent for all permissions.
Warning:
PrivilegedOperations.Allgrants the ability to remotely wipe, retire, restart, and lock any managed device the authenticated user has Intune RBAC access to. Use Intune scope tags to limit which devices can be acted on.
Then create .env:
AZURE_CLIENT_ID=<your-app-client-id>
AZURE_TENANT_ID=<your-tenant-id>To enable destructive actions (retire, wipe), also set:
ENABLE_DESTRUCTIVE_ACTIONS=true2. Install and Build
npm install
npm run build3. Authenticate
npm run authFollow the device code prompt to sign in with your Microsoft account.
4. Run
Stdio mode (for MCP clients like Claude Desktop):
npm startHTTP mode (for web-based MCP clients):
npm run start:http5. Claude Desktop Configuration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"intune-mcp-write": {
"command": "node",
"args": ["F:/Repositories/Intune MCP Write/dist/index.js"],
"env": {
"AZURE_CLIENT_ID": "<your-client-id>",
"AZURE_TENANT_ID": "<your-tenant-id>"
}
}
}
}Tools
Device Read Operations
Tool | Description |
| List managed devices with OData filtering and cursor-based pagination |
| Get full details for a device by Intune ID |
| Search by device name, UPN, or serial number |
Device Write Operations
Tool | Description |
| Rename a managed device |
| Update device notes (uses beta API) |
| Change ownership type (company/personal) |
| Trigger a device sync with Intune |
| List available device categories in the tenant |
| Assign a device category by name or ID |
| Destructive — Remove a device from Intune management entirely |
User Operations
Tool | Description |
| Search Entra ID users by display name or UPN |
| Change the primary user assigned to a device |
Remote Device Actions
Tool | Description |
| Reboot a device remotely (Windows, Android, macOS) |
| Lock a device remotely (iOS, Android, macOS) |
| Rotate BitLocker recovery keys (Windows only) |
| Destructive — Remove company data, preserve personal data |
| Destructive — Factory reset the device |
retire_device,wipe_device, anddelete_devicerequireENABLE_DESTRUCTIVE_ACTIONS=trueand aconfirmDeviceNameparameter that must match the device's actual display name.
Group Read Operations
Tool | Description |
| Search Entra ID groups by display name |
| List members (users and devices) of a group |
| Look up directory object ID from Azure AD device ID |
| List groups a device belongs to |
Group Write Operations
Tool | Description |
| Add a device to an assigned-membership group (auto-resolves device IDs) |
| Remove a device from a group (auto-resolves device IDs) |
| Add a user to an assigned-membership group (accepts UPN or user object ID) |
| Remove a user from a group (accepts UPN or user object ID) |
Bulk Operations
Tool | Description |
| Trigger sync on multiple devices with throttle pacing (max 50) |
| Rename multiple devices with throttle pacing (max 50) |
| Add multiple members (users or devices) to a group with throttle pacing (max 50) |
Bulk operations run sequentially with a configurable delay (default 200ms) between API calls to avoid Graph API rate limits. Each returns per-item success/failure status.
Architecture
Dual transport: Supports stdio (for direct MCP client integration) and HTTP/Streamable (Express-based with session management)
GraphClient: Typed HTTP abstraction over Microsoft Graph with retry logic (3 retries for 401/429/5xx), exponential backoff, cursor-based pagination, and PUT support for
$refassignmentsAuth: MSAL device-code flow with token cache at
~/.intune-mcp-write/token-cache.jsonLogging: JSON structured logs to
~/.intune-mcp-write/logs/with rotation (10MB max, 5 files)
Project Structure
src/
index.ts Entry point (stdio or HTTP transport)
server.ts MCP server factory, registers all tool modules
graph.ts GraphClient (GET/POST/PATCH/PUT/DELETE with retries, pagination)
auth.ts AuthManager (MSAL device-code flow, token cache)
auth-cli.ts CLI for interactive sign-in
http.ts Express-based HTTP/Streamable transport
logger.ts JSON file logger with rotation
tools/
device-properties.ts Device read/write tools
group-membership.ts Group membership tools
remote-actions.ts Remote device actions (restart, lock, wipe, retire)
user-operations.ts User search and primary user management
bulk-operations.ts Bulk sync, rename, and group add tools
errors.ts Error formatting helpers
__tests__/
graph.test.ts GraphClient unit tests
errors.test.ts Error helper unit tests
remote-actions.test.ts Remote action tool tests
user-operations.test.ts User operation tool tests
device-properties-extended.test.ts Category, delete tool tests
group-membership.test.ts User group operation tool tests
bulk-operations.test.ts Bulk operation tool testsKnown Limitations
Dynamic groups cannot have members added/removed (Graph API constraint)
No policy/profile assignment management
No conditional access visibility
Bulk operations use sequential calls — not Graph API
$batch; optimize later if throughput becomes an issue
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
*Updated June 17th 2025** Manage your Microsoft 365 services effortlessly. Create and manage distr…
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables management of Azure Cloud PCs using the Microsoft Graph API, allowing users to list available Cloud PCs in their tenant through Claude Desktop.MIT
- AlicenseBqualityNot gradedmaintenanceProvides comprehensive management of Microsoft 365 services including Exchange, SharePoint, Teams, Azure AD, Intune device management, security & compliance frameworks, and universal access to 1000+ Microsoft Graph API endpoints with advanced features like batch operations, delta queries, and real-time webhooks.5015
- AlicenseNot gradedqualityCmaintenanceEnables management of Microsoft 365 users, licenses, and groups through Microsoft Graph API. Supports user provisioning, license assignment, group management, and automated M365 administration workflows.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants and automation tools to manage Microsoft 365, Entra ID, and Intune resources through 32 tools for user/device/file management and infrastructure monitoring.6MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wborcherdt26/Intune-MCP-Write'
If you have feedback or need assistance with the MCP directory API, please join our Discord server