EntraID MCP Server
Summary: An MCP server that gives an AI client 48 Microsoft Graph tools to read and manage an Entra ID tenant — users, groups, MFA, devices, policies, logs, passwords, app registrations and service principals.
Users — search by name/email, fetch a user by ID, list a user's groups (incl. transitive) and directory roles, and list privileged-role members.
Groups — list/get/search groups, create, update and delete them, and read members; add or remove members and owners.
Sign-in logs — a user's sign-ins over the last N days (requires
AuditLog.Read.All).MFA — registered authentication methods and MFA status for one user or every member of a group.
Devices (Intune, beta endpoint) — list managed devices (optionally by OS), devices per user, full device details, detected apps, compliance-policy states, configuration-profile states, and tenant-wide compliance policies, configuration profiles and device categories.
Conditional access — list all policies as flat rows or fetch one policy's full detail by ID.
Audit logs — directory changes a user made over the last N days (default 30).
Passwords — list/inspect a user's password methods, and reset a password to a supplied or generated value (with length and change-on-next-sign-in options).
Permissions helper — suggest Graph permissions for a task, list permission categories/tasks, and search live Graph permissions by keyword.
Applications — list, get, create, update and delete app registrations.
Service principals — list, get, create, update and delete service principals.
Safety marks — lookups run freely; creates/updates/deletes and password resets are marked for client confirmation.
It publishes tools only (no resources or prompts), runs locally over stdio, and signs in to Graph as the admin's Azure login or a configured app.
Click on "Deploy 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., "@EntraID MCP Server Get sign-in logs for user@domain.com for last 7 days"
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.
EntraID MCP Server
An MCP server that lets an AI client such as Claude Desktop or Cursor read and manage your Microsoft Entra ID tenant — users, groups, MFA, devices, policies, logs and app registrations — through 48 Microsoft Graph tools.
📖 Overview
Users — search users, read a profile, list privileged users and a user's groups and roles (
resources/users.py).Groups — find, create, change and delete groups; add and remove members and owners (
resources/groups.py).Sign-in logs — a user's sign-ins over the last days (
resources/signin_logs.py).MFA — registered authentication methods for a user or every user in a group (
resources/mfa.py).Devices (Intune) — managed devices, detected apps, compliance and configuration, on the Graph beta endpoint (
resources/managed_devices.py).Conditional access — the tenant's policies as flat rows (
resources/conditional_access.py).Audit logs — the directory changes a user made (
resources/audit_logs.py).Password management — reset a password to a given or generated value; read password methods (
resources/password_auth.py).Permissions helper — suggest and search Microsoft Graph permissions (
resources/permissions_helper.py).Applications — list, read, create, change and delete app registrations (
resources/applications.py).Service principals — list, read, create, change and delete service principals (
resources/service_principals.py).
Every tool carries an MCP mark, so a client can let lookups run and ask before a change: 34 tools are read-only; 5 change the tenant without destroying anything (the 3 creates, add member, add owner); 9 are destructive (the 3 deletes, remove member, remove owner, the password reset and the 3 updates).
The server publishes tools only — no MCP resources or prompts. It is started and called by an AI client on behalf of an Entra ID admin. It runs on the admin's machine, talks to the client over standard input and output, and signs in to Microsoft Graph as the admin (or as an app you configure).
Related MCP server: Microsoft Entra MCP Server
🏗️ Runtime architecture
🌐 Downstream systems
System | What for | How | When it is down |
Microsoft Graph v1.0 | Every tool except the 9 device tools and the 2 permission-suggestion tools | HTTPS through msgraph-sdk | The tool call ends in an error result; the server sets no timeout or retry of its own |
Microsoft Graph beta | The 9 device (Intune) tools | HTTPS through msgraph-beta-sdk | As above |
Microsoft Entra ID | A token for Graph, on the first Graph call | The azure-identity credential the configuration selects | The tool call ends in an error result |
The identity the server signs in as needs Graph permissions for the tools you use. Microsoft Graph checks them; the server checks none. This list is carried over from the previous README (application permissions):
Permission | For |
| Users |
| Directory data: users, groups, roles |
| Directory roles |
| Reading groups and members |
| Creating, changing and deleting groups; adding and removing members and owners |
| Sign-in logs and audit logs |
| MFA and password methods |
| Password reset (see ❓ Open questions) |
| Conditional access policies |
| Device tools |
| Creating, changing and deleting applications and service principals |
🚀 Quick Start
You need uv and Python 3.10 or later. The package pulls in fastmcp on its 4.x line (fastmcp>=4.1.3,<5), msgraph-sdk, msgraph-beta-sdk, msgraph-core, azure-identity, azure-core and python-dotenv, each pinned below its next major version in pyproject.toml.
Sign in to Azure with an account that has the permissions above. The server uses this login by default:
az loginAdd the server to the
mcpServersobject of your AI client's MCP settings — Claude Desktop:claude_desktop_config.json; Cursor:.cursor/mcp.json:{ "mcpServers": { "entraid": { "command": "uvx", "args": ["entraid-mcp-server"] } } }uvxdownloads the latest release from PyPI and starts it; add@<version>to the package name to pin one.To sign in as an app instead of your Azure login (no interactive login available, for example), add an
envblock to the same entry. Never commit real values:"env": { "TENANT_ID": "<your-tenant-id>", "CLIENT_ID": "<your-client-id>", "CLIENT_SECRET": "<your-client-secret>" }Certificate sign-in,
.envfiles and the order the server tries credentials in: configuration.Restart the client so it starts the server.
To run from a clone instead (from the repo root, with uv installed):
uv sync
uv run entraid-mcp-server # or: uv run python -m msgraph_mcp_serverWith the package installed in an environment (pip install entraid-mcp-server), the entraid-mcp-server command starts the same server.
✅ Verify it works
In your AI client, list the server's tools: you should see 48. Then call list_permission_categories_and_tasks — it needs no Graph access, so it works before any permission is granted. The result starts:
{"status": "success", "categories": {"users": {"tasks": [{"name": "read_user_profile", "description": "Read user profile information"}, ...with the categories users, groups, mail, calendar, files, devices, audit_logs and directory. The server signs in only on the first tool that calls Microsoft Graph, so a sign-in problem shows up there, as the tool's error result.
The client also sees the server's name, EntraID MCP Server, and its version: the installed release number (from a clone, the version in pyproject.toml).
🛠️ Common commands
All from the repo root:
Command | What it does |
| Install the locked dependencies, dev tools included |
| Build the wheel and source archive into |
| Run the unit tests (an in-memory Microsoft Graph; no tenant needed) |
| Lint |
| Check formatting |
| Start the server on stdio |
Releases are automatic: there is no publish command to run. A pull request to dev, and a push to dev, run the check workflow (build, tests, lint, format). When dev is merged into main and the push touches src/msgraph_mcp_server/, pyproject.toml, README.md, LICENSE or the publish workflow, the publish workflow (which can also be started by hand on main) computes the next version from the git tags, builds the package, publishes it to PyPI and creates the GitHub release.
⚠️ Known limitations
The device tools use the Microsoft Graph beta endpoint, which Microsoft can change without notice.
The server sets no timeout or retry of its own; a slow or failing Graph call ends the tool call with an error result.
search_groups_by_namematches the start of the display name, not any part of it.create_groupis several Graph calls with no rollback: if an owner or member add fails, the group stays created.reset_user_password_directreturns a generated password in its result, so it reaches the AI client's conversation.Membership checks and searches read Graph with eventual consistency: a change made moments earlier may not be seen yet.
📚 Documentation
Page | Answers |
How to find users and read their groups and roles | |
How groups, members and owners are managed, and what each result means | |
How to read a user's sign-ins | |
How MFA status is worked out for a user or a group | |
Which device, compliance and configuration data you can read | |
How policies are flattened into rows | |
How to read the changes a user made | |
How a reset works and how the password is protected | |
How to find the Graph permissions a task needs | |
How app registrations are managed | |
How service principals are managed | |
Which settings choose how the server signs in, and where it reads them | |
MIT licence |
❓ Open questions
Question | Why it matters | Checked | Who can answer |
Is the permissions table above complete and least-privilege for the current 48 tools? | Admins grant exactly what this table says. | The code checks no permission; the table is carried over from the previous README. Only | Maintainer (baoduy) |
Does the password reset need | A wrong grant makes the reset fail, or grants more than needed. |
| Maintainer (baoduy) |
Where should users report problems or ask for support? | The README names no support route. |
| Maintainer (baoduy) |
Available Tools
48 toolsadd_group_memberAdd Group MemberC
Add a member to a group.
Inputs: group_id (required), member_id (required). Returns: object
add_group_ownerAdd Group OwnerC
Add an owner to a group.
Inputs: group_id (required), owner_id (required). Returns: object
create_applicationCreate ApplicationC
Create a new application (app registration).
Inputs: app_data (required). Returns: object
create_groupCreate GroupC
Create a new group in Microsoft Graph.
Inputs: group_data (required). Returns: object
create_service_principalCreate Service PrincipalC
Create a new service principal.
Inputs: sp_data (required). Returns: object
delete_applicationDelete ApplicationADestructive
Delete an application (app registration) by its object ID.
Inputs: app_id (required). Returns: object
delete_groupDelete GroupCDestructive
Delete a group from Microsoft Graph.
Inputs: group_id (required). Returns: object
delete_service_principalDelete Service PrincipalCDestructive
Delete a service principal by its object ID.
Inputs: sp_id (required). Returns: object
get_all_graph_permissionsGet All Graph PermissionsBRead-only
Get all Microsoft Graph permissions directly from the Microsoft Graph API.
Inputs: no named parameters. Returns: object
get_all_groupsGet All GroupsCRead-only
Get all groups (up to the specified limit, with paging).
Inputs: limit. Returns: result
get_all_managed_devicesGet All Managed DevicesARead-only
Get all managed devices (optionally filter by OS).
Inputs: filter_os. Returns: result
get_application_by_idGet Application By IdBRead-only
Get a specific application by its object ID.
Inputs: app_id (required). Returns: result
get_conditional_access_policiesGet Conditional Access PoliciesBRead-only
Get all conditional access policies.
Inputs: no named parameters. Returns: result
get_conditional_access_policy_by_idGet Conditional Access Policy By IdBRead-only
Get a single conditional access policy by its ID with comprehensive details.
Inputs: policy_id (required). Returns: object
get_detected_apps_for_deviceGet Detected Apps For DeviceARead-only
Get applications detected on a specific Intune managed device (beta endpoint).
Inputs: device_id (required). Returns: result
get_device_categoriesGet Device CategoriesARead-only
List all Intune device categories (beta endpoint).
Inputs: no named parameters. Returns: result
get_device_compliance_policiesGet Device Compliance PoliciesARead-only
List all Intune device compliance policies (beta endpoint).
Inputs: no named parameters. Returns: result
get_device_compliance_policy_statesGet Device Compliance Policy StatesBRead-only
Get compliance-policy states for a specific Intune managed device (beta endpoint).
Inputs: device_id (required). Returns: result
get_device_configurationsGet Device ConfigurationsARead-only
List all Intune device configuration profiles (beta endpoint).
Inputs: no named parameters. Returns: result
get_device_configuration_statesGet Device Configuration StatesBRead-only
Get configuration-profile states for a specific Intune managed device (beta endpoint).
Inputs: device_id (required). Returns: result
get_group_by_idGet Group By IdCRead-only
Get a specific group by its ID.
Inputs: group_id (required). Returns: result
get_group_membersGet Group MembersBRead-only
Get members of a group by group ID (up to the specified limit, with paging).
Inputs: group_id (required), limit. Returns: result
get_group_mfa_statusGet Group Mfa StatusBRead-only
Get MFA status for all members of a group.
Inputs: group_id (required). Returns: result
get_managed_device_by_idGet Managed Device By IdBRead-only
Get full details of a single Intune managed device (beta endpoint).
Inputs: device_id (required). Returns: result
get_managed_devices_by_userGet Managed Devices By UserCRead-only
Get all managed devices for a specific userId.
Inputs: user_id (required). Returns: result
get_privileged_usersGet Privileged UsersARead-only
Get all users who are members of privileged directory roles.
Inputs: no named parameters. Returns: result
get_service_principal_by_idGet Service Principal By IdBRead-only
Get a specific service principal by its object ID.
Inputs: sp_id (required). Returns: result
get_user_audit_logsGet User Audit LogsBRead-only
Get all relevant directory audit logs for a user by user_id within the last N days (default 30).
Inputs: user_id (required), days. Returns: result
get_user_by_idGet User By IdCRead-only
Get a specific user by their ID.
Inputs: user_id (required). Returns: result
get_user_groupsGet User GroupsARead-only
Get all groups (including transitive memberships) for a user by user ID.
Inputs: user_id (required). Returns: result
get_user_mfa_statusGet User Mfa StatusARead-only
Get MFA status and methods for a specific user.
Inputs: user_id (required). Returns: result
get_user_password_methodGet User Password MethodCRead-only
Get a specific password authentication method for a user.
Inputs: user_id (required), method_id (required). Returns: result
get_user_rolesGet User RolesARead-only
Get all directory roles assigned to a user by user ID.
Inputs: user_id (required). Returns: result
get_user_sign_insGet User Sign InsARead-only
Get sign-in logs for a specific user within the last N days.
Requires AuditLog.Read.All permission.
Inputs: user_id (required), days. Returns: result
list_applicationsList ApplicationsBRead-only
List all applications (app registrations) in the tenant, with paging.
Inputs: limit. Returns: result
list_permission_categories_and_tasksList Permission Categories And TasksARead-only
List all available categories and tasks for permission suggestions.
Inputs: no named parameters. Returns: object
list_service_principalsList Service PrincipalsARead-only
List all service principals in the tenant, with paging.
Inputs: limit. Returns: result
list_user_password_methodsList User Password MethodsCRead-only
List a user's password authentication methods.
Inputs: user_id (required). Returns: result
remove_group_memberRemove Group MemberCDestructive
Remove a member from a group.
Inputs: group_id (required), member_id (required). Returns: object
remove_group_ownerRemove Group OwnerCDestructive
Remove an owner from a group.
Inputs: group_id (required), owner_id (required). Returns: object
reset_user_password_directReset User Password DirectCDestructive
Reset a user's password with a specific password value.
Inputs: user_id (required), password, password_length, generate_password, +1 more. Returns: object
search_groups_by_nameSearch Groups By NameARead-only
Search for groups whose display name starts with the given text (case-insensitive, with paging).
Inputs: name (required), limit. Returns: result
search_permissionsSearch PermissionsCRead-only
Search for Microsoft Graph permissions by keyword.
Inputs: search_term (required), permission_type. Returns: object
search_usersSearch UsersBRead-only
Search for users by name or email.
Inputs: query (required), limit. Returns: result
suggest_permissions_for_taskSuggest Permissions For TaskCRead-only
Suggest Microsoft Graph permissions for a specific task based on common mappings.
Inputs: task_name (required), task_category (required). Returns: object
update_applicationUpdate ApplicationCDestructive
Update an existing application (app registration).
Inputs: app_id (required), app_data (required). Returns: object
update_groupUpdate GroupCDestructive
Update an existing group in Microsoft Graph.
Inputs: group_id (required), group_data (required). Returns: object
update_service_principalUpdate Service PrincipalCDestructive
Update an existing service principal.
Inputs: sp_id (required), sp_data (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 48 tools
Most tools target clearly distinct resource+action pairs, and related tools like get_user_mfa_status versus get_group_mfa_status or get_device_compliance_policies versus get_device_compliance_policy_states are distinguishable from their descriptions. Some clusters, especially the permissions and device-state tools, are close enough that an agent could occasionally hesitate.
The set largely follows a predictable verb_noun convention: search_users, get_group_by_id, create_application, delete_service_principal, and similar. Minor inconsistencies appear in collection-listing verbs such as get_all_groups versus list_applications, plus a few suffixes like _direct, but the pattern remains easy to infer.
With 48 tools, the surface is far above the typical 3–15 range and is heavy for an agent to navigate. The EntraID domain is broad, but the tool count still feels excessive and likely includes specialized operations that could be scoped or grouped more tightly.
Coverage is strong for read operations across users, groups, devices, MFA, conditional access, audit logs, and permissions, and there is full CRUD for groups, applications, and service principals. However, notable gaps remain, including user create/update/delete operations, group owner listing, and write operations for conditional access and managed devices.
Maintenance
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
One OAuth connector for your team's remote MCP servers, with Tool Packs, guardrails and logs.
Managed MCP gateway with OAuth, per-agent permissions, shared accounts and activity logs.
Related MCP Servers
- AlicenseCqualityNot gradedmaintenanceAn MCP server that enables interaction with Microsoft 365 services like Outlook, OneDrive, Teams, and SharePoint via the Microsoft Graph API. It supports comprehensive operations including email management, file access, and organizational collaboration for personal and work accounts.78-
- AlicenseNot gradedqualityDmaintenanceA FastMCP server that provides AI assistants with access to Microsoft Entra (Azure AD) directory services. It enables LLMs to search for users, groups, and check memberships using the Microsoft Graph API.MIT
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server for Microsoft 365 administration using Graph API application permissions, enabling security monitoring, identity audits, incident response, and service health management.113 npm20MIT
- AlicenseNot gradedqualityDmaintenanceRemote MCP server for Microsoft Graph with delegated OAuth support, enabling interaction with Microsoft 365 services like mail, calendar, OneDrive, SharePoint, Teams, and more via natural language.MIT