Microsoft Intune & Entra ID MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Microsoft Intune & Entra ID MCP Server
A comprehensive Model Context Protocol (MCP) server for managing Microsoft Intune and Entra ID (Azure AD) through the Microsoft Graph API. This server enables AI assistants to perform device management, user administration, security configuration, and more -- 134 tools across 16 categories.
Features
Core
Test Graph API connectivity and get tenant info
Intune overview with device counts and compliance summary
Intune Device Management
List, search, and manage devices with filters
Compliance monitoring and non-compliant device reporting
Remote actions (sync, restart, lock, wipe, retire, rename)
Bulk device sync
Hardware inventory, installed apps, and network info
Stale device detection
Autopilot device and profile management
Device configuration profiles and compliance policies
App Management
List, search, and inspect mobile apps
Assign apps to groups (required, available, uninstall)
Remove all app assignments
Entra ID (Azure AD) User Management
Full user CRUD operations
User onboarding with manager, licenses, and group assignment
User offboarding (block sign-in, revoke sessions, remove groups/apps/licenses)
Password management and reset
License assignment and management
Manager assignment and direct reports
Bulk operations (create users, assign licenses, add to groups)
Sign-in activity tracking
Deleted user recovery
Entra ID Device Management
List, search, and inspect Entra ID devices
Delete devices from Entra ID, Intune, or both
Enable/disable Entra devices
Group Management
Security groups (static and dynamic)
Microsoft 365 groups
Member and owner management
Dynamic membership rules
Search and delete groups
Conditional Access
Policy listing and inspection
Enable/disable policies
Named locations management
Authentication & Identity Protection
MFA status monitoring
Authentication methods management
Sign-in logs with filtering
Risky user detection and dismissal
Risk detections and alerts
Directory audit logs
App Registrations & Enterprise Apps
List and search app registrations
Credential expiry monitoring
Enterprise app management (enable/disable)
App permission inspection
Delete app registrations
Windows 365 Cloud PC
List and manage Cloud PCs
Provisioning policies
Restart, reprovision actions
Gallery images
Cloud PC overview
Tenant Administration
Organization and domain information
Service health monitoring and issue tracking
Directory roles and membership
Global admin listing
License/subscription management
Security defaults status
Role assignment
Scripts & Remediations
PowerShell script management and deployment status
Proactive remediation scripts and status summaries
Security & Compliance
Security baselines and deployed profiles
App protection policies (MAM)
Enrollment restrictions
Device categories
Windows malware reports
Device protection overview and threat state
Per-device malware detection
Reports
Device compliance summary
Configuration profile deployment status
Compliance policy deployment status
App installation status
License usage reports
Hardware inventory reports
Related MCP server: Minerva MCP
Prerequisites
Python 3.11+
Microsoft Entra ID (Azure AD) tenant
App registration with appropriate permissions
Required API Permissions
Add these permissions to your app registration in Azure Portal:
Intune
DeviceManagementManagedDevices.ReadWrite.All
DeviceManagementConfiguration.ReadWrite.All
DeviceManagementApps.ReadWrite.All
DeviceManagementServiceConfig.ReadWrite.AllEntra ID
User.ReadWrite.All
Group.ReadWrite.All
Directory.ReadWrite.All
RoleManagement.ReadWrite.Directory
Policy.ReadWrite.ConditionalAccess
IdentityRiskyUser.ReadWrite.All
IdentityRiskEvent.Read.All
AuditLog.Read.All
UserAuthenticationMethod.ReadWrite.AllWindows 365
CloudPC.ReadWrite.AllService Health & Reports
ServiceHealth.Read.All
Reports.Read.AllOther
Organization.Read.All
Domain.Read.All
Application.Read.AllInstallation
Clone or download the repository
Create a virtual environment
cd "C:\MCP" #Change the location
py -3 -m venv venv
.\venv\Scripts\Activate.ps1
pip install -e .Install dependencies
"pip install -r requirements.txt"OR
"pip install -e ."
Configure environment variables
Create a .env file or set environment variables:
TENANT_ID=your-tenant-id
CLIENT_ID=your-client-id
CLIENT_SECRET=your-client-secretConfiguration for Cursor
Add to your Cursor MCP configuration (~/.cursor/mcp.json on Windows: %USERPROFILE%\.cursor\mcp.json):
{
"mcpServers": {
"intune": {
"command": "C:\\MCP\\venv\\Scripts\\python.exe",
"args": ["C:\\MCP\\intune_mcp_server\\server.py"],
"env": {
"TENANT_ID": "your-tenant-id",
"CLIENT_ID": "your-client-id",
"CLIENT_SECRET": "your-client-secret"
}
}
}
}Configuration for VS Code
VS Code supports MCP servers via GitHub Copilot (agent mode) and other MCP-compatible extensions.
User-level configuration with envFile (recommended)
Use this to keep secrets out of mcp.json and centralize credentials in a local .env file.
Windows user config path:
%APPDATA%\Code\User\mcp.json
{
"servers": {
"intune": {
"type": "stdio",
"command": "E:\\MCP\\intune-mcp-server\\.venv\\Scripts\\intune-mcp-server.exe",
"args": [],
"envFile": "E:\\MCP\\intune-mcp-server\\.env"
}
},
"inputs": []
}Enabling MCP in VS Code
Install the GitHub Copilot extension (v1.156+) or another MCP-compatible extension.
Open the Command Palette (
Ctrl+Shift+P) and runMCP: List Serversto verify the server is detected.In GitHub Copilot Chat, switch to Agent mode (the sparkle icon) to use MCP tools.
Configuration Comparison
Setting | Cursor | VS Code |
Config file |
|
|
Root key |
|
|
Type field | Not required |
|
Scope | Global | Workspace or user-level |
Available Tools (134)
Core (2 tools)
Tool | Description |
| Test Microsoft Graph API connection and return tenant info |
| Intune overview with device counts and compliance summary |
Intune Device Management (9 tools)
Tool | Description |
| List all Intune managed devices (supports filters, pagination) |
| Get comprehensive device information by device ID |
| Search devices by name, user, or serial number |
| List non-compliant devices |
| Trigger device sync |
| Remotely restart a device |
| Remotely lock a device |
| Wipe a device -- destructive, requires |
| Retire a device (remove company data), requires |
Device Inventory & Advanced Management (6 tools)
Tool | Description |
| Hardware inventory for a specific device |
| List installed apps on a device |
| Rename a managed device remotely |
| Sync multiple devices at once |
| Network information for a device |
| Devices inactive for a given number of days |
Autopilot (2 tools)
Tool | Description |
| List Windows Autopilot devices |
| List Windows Autopilot deployment profiles |
Policy Management (2 tools)
Tool | Description |
| List device compliance policies |
| List device configuration profiles |
App Management (5 tools)
Tool | Description |
| List mobile apps in Intune |
| Get details for a specific app |
| Search apps by name |
| Assign an app to a group (required, available, or uninstall) |
| Remove all assignments for an app, requires |
Entra ID User Management (25 tools)
Tool | Description |
| List tenant users (supports filters, pagination) |
| Get user details by ID or UPN |
| Search users by name |
| Create a new Entra ID user |
| Update user properties (name, job title, department, etc.) |
| Delete a user, requires |
| Enable a user account |
| Disable a user account (block sign-in) |
| Reset user password |
| Revoke all refresh tokens for a user |
| List managed devices for a user |
| Get license assignments for a user |
| Assign a license to a user |
| Remove a license from a user |
| List available license SKUs in the tenant |
| List recently deleted users (recoverable within 30 days) |
| Restore a deleted user |
| Assign a manager to a user |
| Remove a user's manager |
| List direct reports for a user |
| Onboard a new user (create account, assign manager, licenses, groups) |
| Offboard a user (block sign-in, revoke sessions, remove groups/apps/licenses) |
| Create multiple users in a single operation |
| Assign a license to multiple users |
| Add multiple users to a group |
Entra ID Device Management (8 tools)
Tool | Description |
| List devices in Entra ID (supports filters, pagination) |
| Search Entra devices by display name |
| Get details for an Entra ID device |
| Delete a device from Entra ID, requires |
| Delete a device from Intune, requires |
| Delete a device from both Intune and Entra ID, requires |
| Disable a device in Entra ID |
| Enable a device in Entra ID |
Group Management (12 tools)
Tool | Description |
| List Azure AD groups |
| Search groups by name |
| Get group details |
| Create a security group |
| Create a Microsoft 365 group |
| Create a dynamic security group with a membership rule |
| Delete a group, requires |
| List members of a group |
| Add a member to a group |
| Remove a member from a group |
| List owners of a group |
| Add an owner to a group |
Conditional Access (5 tools)
Tool | Description |
| List all Conditional Access policies |
| Get details for a specific CA policy |
| Enable a Conditional Access policy |
| Disable a Conditional Access policy |
| List named locations used in CA policies |
Authentication & Identity Protection (7 tools)
Tool | Description |
| List authentication methods for a user |
| Check MFA status and registered methods for a user |
| Get sign-in logs (filter by user, status, date range) |
| List risky users from Identity Protection |
| Get risk detections from Identity Protection |
| Dismiss risk for a user |
| Get directory audit logs (filter by category, date range) |
App Registrations & Enterprise Apps (11 tools)
Tool | Description |
| List app registrations with credential expiry info |
| Get app registration details (permissions, credentials) |
| Search app registrations by name |
| List enterprise apps (service principals) |
| Get enterprise app details |
| Search enterprise apps by name |
| Get permissions granted to an enterprise app |
| Enable an enterprise app |
| Disable an enterprise app |
| List app registrations with credentials expiring within N days |
| Delete an app registration, requires |
Windows 365 Cloud PC (7 tools)
Tool | Description |
| List all Cloud PCs |
| Get details for a Cloud PC |
| Restart a Cloud PC |
| Reprovision a Cloud PC, requires |
| List Cloud PC provisioning policies |
| List gallery images available for provisioning |
| Get Cloud PC overview and summary |
Tenant Administration (10 tools)
Tool | Description |
| Get organization/tenant information |
| List domains for the tenant |
| Get Microsoft 365 service health status |
| Get current and recent service issues (filter by service) |
| List active directory roles |
| List members of a directory role |
| List Global Administrator role members |
| List subscribed SKUs (licenses) |
| Check security defaults status |
| Assign a directory role to a user or group |
Scripts & Remediations (6 tools)
Tool | Description |
| List PowerShell scripts in Intune |
| Get details for a PowerShell script |
| Get deployment status for a script |
| List proactive remediation scripts |
| Get details for a proactive remediation script |
| Get status summary for a proactive remediation script |
Security & Compliance (11 tools)
Tool | Description |
| List security baseline templates |
| List deployed security baseline profiles |
| Get deployment status for a security baseline |
| List mobile app protection policies (MAM) |
| List device enrollment restrictions |
| List device categories |
| Create a device category |
| Get Windows malware report |
| Get device protection status overview |
| Get threat state for managed Windows devices |
| Get detected malware for a specific device |
Reports (6 tools)
Tool | Description |
| Device compliance summary |
| Deployment status for a configuration profile |
| Deployment status for a compliance policy |
| Installation status for an app |
| License usage summary |
| Hardware inventory summary |
Security Considerations
Client Secret Protection: Never commit client secrets to version control
Least Privilege: Grant only required permissions
Audit Logging: Monitor API usage through Azure AD logs
Destructive Actions: All destructive operations require
confirm=True
Example Usage
Once configured, you can ask your AI assistant:
Device Management
"List all Windows devices in my tenant"
"Show me non-compliant devices"
"Sync all devices for user john.doe"
"Show stale devices inactive for 90 days"
"Rename device X to Y"
User Management
"Create a new user john.doe@company.com"
"Onboard user with manager, licenses, and group membership"
"Offboard user john.doe@company.com"
"Reset password for user X"
"Show direct reports for manager Y"
"Bulk create users from this list"
App & License Management
"List all mobile apps"
"Assign app X to group Y as required"
"Show me license usage"
"List available licenses"
"Show app registrations with expiring credentials"
Security & Compliance
"List all Conditional Access policies"
"Show MFA status for user X"
"List risky users"
"Show Windows malware report"
"List security baseline profiles"
Cloud & Infrastructure
"Get Cloud PC overview"
"List all Entra devices"
"Delete device from both Intune and Entra"
"Show service health status"
"List Global Administrators"
User Offboarding
The offboard_user tool provides comprehensive automated offboarding:
offboard user john.doe@company.comThis will:
Block user sign-in
Revoke all active sessions
Remove from all groups
Remove all app assignments
Remove all licenses
Generate detailed access checklist
The user account is NOT deleted -- it remains disabled for audit purposes.
See OFFBOARDING_GUIDE.md for detailed documentation.
User Onboarding
The onboard_user tool provides automated onboarding:
onboard user with display name "John Doe", UPN john.doe@company.com, manager ID ..., license SKUs [...], group IDs [...]This will:
Create the user account
Assign a manager
Assign specified licenses
Add to specified groups
Optionally send a welcome email
Troubleshooting
Connection Issues
Verify TENANT_ID, CLIENT_ID, and CLIENT_SECRET are correct
Check app registration permissions in Azure Portal
Ensure admin consent is granted for permissions
Permission Errors
Review required permissions above
Grant admin consent in Azure Portal
Some features require specific licenses (e.g., Entra ID P1/P2)
Beta API Features
Some features use Microsoft Graph beta endpoints
Beta APIs may change without notice
License
MIT License
Contributing
Contributions welcome! Please feel free to submit issues and pull requests.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Microsoft 365, CRM, Partner Center and tenant operations for organisations and MSPs.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
See and manage your company's apps, access, devices and spend from your AI assistant.
Related MCP Servers
- 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.8MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to administer Microsoft 365 and Azure, including PowerShell-only areas like Exchange, SharePoint, Teams, and Purview, with risk classification and human approval for write operations.75 npm2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to perform read/write management of Microsoft Intune and Entra ID across devices, apps, users, groups, Conditional Access, Cloud PC, compliance, and reports via Microsoft Graph.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to access Microsoft Teams and Microsoft Graph data for messaging, chat and channel management, search, file upload/download, user lookup, and rich message formatting.12 npmMIT