# hieutran/entraid-mcp-server [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/hieuttmmo/entraid-mcp-server  
**GitHub Stars:** 41  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hieutran-entraid-mcp-server

## Description
A MCP server for Microsoft Entra ID (Azure AD) directory, user, group, device, sign-in, and security operations via Microsoft Graph Python SDK.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/hieuttmmo/entraid-mcp-server), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Start the server:

```sh
fastmcp dev '/path/to/src/msgraph_mcp_server/server.py'
```

2. Install:

```sh
fastmcp install '/path/to/src/msgraph_mcp_server/server.py' \
  --with msgraph-sdk --with azure-identity --with azure-core --with msgraph-core \
  -f /path/to/.env
```

## Documentation

## What hieutran/entraid-mcp-server MCP server does

The hieutran/entraid-mcp-server MCP server connects an MCP client to Microsoft Graph for Microsoft Entra ID administration and directory investigation. Its resource-oriented implementation separates operations into modules while sharing a central Graph client and authentication manager.

User operations include searching by name or email, retrieving a user by ID, listing privileged users, inspecting assigned directory roles, and finding direct or transitive group memberships. Group operations cover listing and searching groups, reading members, creating or updating groups, deleting groups, and managing members and owners.

The server also handles managed-device queries, user sign-in logs, MFA status for individual users or group members, directory audit logs, and conditional access policy reads. Administrative tools can reset a user password with a supplied or generated value and can require a password change at the next sign-in.

Application and service-principal resources support listing, lookup, creation, updates, deletion, and inspection of app role assignments or delegated permissions where documented. Permission helper tools suggest Graph permissions for mapped tasks and search or list available Graph permissions.

## How it works

A FastMCP entry point registers the resource modules and exposes their functions as MCP tools. Calls use Microsoft Graph with the configured tenant and application credentials. Several list operations support paging or configurable limits, while sign-in and audit-log queries accept a lookback period.

Inputs for group, application, and service-principal creation or updates are dictionaries. Examples in the project identify fields such as group display name, mail nickname, visibility, membership settings, application display name, web or API configuration, and service-principal account status. Graph permissions must be sufficient for the requested operation.

## Setup and configuration

Clone the repository and create `config/.env` with the required Azure credentials:

- `TENANT_ID`: the Entra tenant identifier
- `CLIENT_ID`: the application client identifier
- `CLIENT_SECRET`: the application secret

Certificate-based authentication is described as an optional setup path. The project keeps environment and secret files out of version control. For development, run the server file through the FastMCP CLI, for example with `fastmcp dev '/path/to/src/msgraph_mcp_server/server.py'`. This opens the FastMCP development environment and MCP Inspector.

## Tools and capabilities

The hieutran/entraid-mcp-server MCP server includes tools for:

- Finding users, roles, privileged users, and group memberships
- Reading, creating, updating, and deleting groups and their members or owners
- Querying managed devices by operating system or user
- Reading sign-in logs, MFA status, audit logs, and conditional access policies
- Resetting passwords with optional generated passwords and next-sign-in changes
- Managing app registrations and service principals
- Inspecting and searching Microsoft Graph permissions

FastMCP context handling provides progress reporting and consistent error handling, while project logging supports troubleshooting.

## Limitations and notes

The available operations depend on Microsoft Graph permissions granted to the configured application. Destructive actions include deleting groups, applications, or service principals and resetting passwords, so they require appropriate authorization and should be evaluated before execution. It also lists resource capabilities without defining every Graph permission required for each individual tool; use the permission helper and Microsoft Graph authorization setup when planning access.

_Full upstream README: https://allmcps.com/mcp/hieutran-entraid-mcp-server/readme_

