microsoft-365-directory-mcp
Use the Microsoft 365 Directory MCP tools (directory_*) to look people up in Entra ID: search users by display name, fetch a user by object ID or UPN, get a…
от CognitionAI★ 42 звезды на GitHub
Установить microsoft-365-directory-mcp в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Microsoft 365 Directory (MCP tools)
Connect to the directory endpoint /directory/mcp. It exposes only directory_* tools, all
read-only — mail, calendar, files, Teams and tasks live behind separate endpoints.
Choosing a tool
| You want to… | Call |
|---|---|
| Find a person by name | directory_search_users |
| Look someone up by object id or UPN/email | directory_get_user |
| Find who someone reports to | directory_get_manager |
| Know who the signed-in user is | directory_me |
Tool signatures
| Tool | Notes |
|---|---|
directory_search_users(query, limit?, cursor?) |
Matches display name only. query must be non-empty; quotes/backslashes are escaped for you. |
directory_get_user(user_id) |
user_id is an Entra object id or a UPN/email. |
directory_get_manager(user_id) |
Returns the manager; object_type says whether it is a user or an org contact. |
directory_me() |
The signed-in delegated user. |
All of them return a narrow projection: id, display_name, given_name, surname, mail,
user_principal_name. Use id (the Entra object id, a GUID) whenever another tool asks for
a user id — for example the Collaboration MCP's collaboration_send_dm and mentions require
exactly that GUID and reject a UPN or email address.
Using it well
- Searching by an email address or UPN will not work in
search_users— pass it todirectory_get_userinstead. - Resolve ambiguity with the user, not by guessing. If
search_usersreturns several people, present the candidates (name + mail) and ask which one — never pick the first match before sending a message, an invitation or anything else user-visible. - If a search returns nothing, try a shorter or differently spelled display name, or ask the
user for the person's address and use
directory_get_user. directory_meis the cheapest way to establish "the user" (their address, object id) before composing something on their behalf.- Never paste the bearer token, and never quote raw Graph error bodies to the user.
Paging
Lists return { "items": [...], "next": <cursor|null> }. For more results, repeat the call with
cursor set to next verbatim and nothing else changed; never edit or build the URL. Only
next: null means the results are exhausted. limit defaults to 25, max 200. Prefer refining
query over paging deep into search results.
Examples
directory_me { }
// -> { "id": "0a1b...-guid", "display_name": "Sam Lee", "mail": "[email protected]" }
directory_search_users { "query": "Ana Ruiz", "limit": 10 }
// -> items: [{ "id": "6f1e...-guid", "display_name": "Ana Ruiz", "mail": "[email protected]" }]
// two matches? -> ask the user which one before doing anything with the result
directory_get_user { "user_id": "[email protected]" }
directory_get_manager { "user_id": "6f1e...-guid" }
// -> { "id": "3c2d...-guid", "display_name": "Iris Cole", "object_type": "user" }
// Cross-workload handoff (only if the Collaboration endpoint is also connected):
// take items[].id from the search and pass it as collaboration_send_dm's user_id.
Not available — don't promise these
- Any write: creating, updating or deleting users, groups or memberships. Directory is read-only.
- Group and Microsoft 365 Groups listing or management; direct reports, photos and org charts.
- Searching by mail/UPN/job title/department — display-name search plus
get_useronly. - Guest/B2B or cross-tenant lookups beyond what the signed-in user's tenant returns.
When something fails
- A tool is missing from
tools/list→ the user's token lacks its scope.directory_search_users/directory_get_useracceptUser.ReadBasic.All,User.Read.All,User.ReadWrite.All,Directory.Read.AllorDirectory.ReadWrite.All.directory_get_managerneeds a strictly higher scope —User.Read.All,User.ReadWrite.All,Directory.Read.All,Directory.ReadWrite.All,AgentIdUser.ReadWrite.AllorAgentIdUser.ReadWrite.IdentityParentedBy— so search working whileget_manageris missing is expected, not a bug.directory_mealso accepts plainUser.Read. Calling an uncovered tool returnsinsufficient_scopewithrequired_scopes; report which scope to add (admin consent may be needed) instead of improvising. 401
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл microsoft-365-directory-mcp?
Use the Microsoft 365 Directory MCP tools (directory_*) to look people up in Entra ID: search users by display name, fetch a user by object ID or UPN, get a user's manager, and identify the signed-in user. Invoke whenever a task needs someone's identity, email address or Entra object ID (for example before DMing them in Teams or inviting them to a meeting): it gives exact tool signatures, what each returns, paging rules, and how to resolve ambiguous matches safely. Directory is read-only.
Как установить скилл microsoft-365-directory-mcp?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл microsoft-365-directory-mcp запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…