msgraph skill
A skill with a local index of 27,700 Microsoft Graph endpoints: endpoint search, permissions and API calls from the command line
- 119 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- After sign-in the agent can read mail, users and policies of a Microsoft 365 tenant within the granted permissions
- Modifying Graph calls are possible, the safeguard rests on confirmation, and tokens are cached on disk by default
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/msgraphDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- After sign-in the agent can read mail, users and policies of a Microsoft 365 tenant within the granted permissions
- Modifying Graph calls are possible, the safeguard rests on confirmation, and tokens are cached on disk by default
This is third-party code. Review the repository files before installing.
What it does
msgraph gives the agent current knowledge of the Microsoft Graph API, which is updated weekly and quickly outruns a model's training data. The skill contains local indexes: 27,700 OpenAPI endpoints, 6,200 documentation pages with permissions, query parameters and headers, and 4,200 resource schemas listing properties and `$filter` operators. Hand-verified community query samples sit alongside. Search runs locally and offline with three commands: `msgraph sample-search --query "conditional access policies"`, `msgraph api-docs-search --endpoint /users --method GET` and `msgraph openapi-search --query "send mail"`. A Go binary is built for macOS, Linux and Windows on amd64 and arm64, and no dependencies are needed on the working machine. For executing requests there is MSAL browser sign-in with a device-code fallback and an app-only mode. The commands `msgraph auth signin` and `msgraph graph-call GET /me` work right away, while writes need explicit confirmation. If the Lokka MCP server or another Graph server is connected, the skill hands the call over to it.
Who it is for. Microsoft 365 and Entra ID administrators and developers of Graph integrations who write queries with an agent and are tired of invented endpoints.
Good fit when
- The agent suggests an outdated or nonexistent Graph path and has to be tied to a current index
- Before a call you want to know which delegated or application permissions a specific endpoint requires
- A task about conditional access policies or mail has to become an exact Graph query from a ready sample
- You want to read a profile or recent messages through `graph-call GET` without a separate MCP server
Not a fit when
- The task is not about Microsoft Graph, such as the Azure SDK or Power Platform APIs: the index covers Graph only
- Access to the tenant is banned by organization policy: direct MSAL sign-in uses a default application ID
- You want documentation only without executing requests: local search is enough and no account sign-in is needed
Example request
Find the Microsoft Graph endpoint for listing conditional access policies and tell me which permissions it needsLimitations
Sign-in goes through a client application with a built-in ID, and you set your own with `MSGRAPH_CLIENT_ID`; the default tenant is `common` and the default API version is `beta`, whose endpoints are less stable than `v1.0`. The token cache is saved to disk and can be turned off with `MSGRAPH_NO_TOKEN_CACHE=true`. Search works offline, but the indexes update only with a new skill version and the endpoint list can lag behind Graph. Community samples grow gradually. The README lists no supported agents, and the SKILL.md format is generic.
How to disable. Delete the `msgraph` folder from the agent skills directory (for example `~/.claude/skills/msgraph`). The token cache lives on disk; set `MSGRAPH_NO_TOKEN_CACHE=true` to keep it in memory only.
FAQ
How do I install msgraph in Claude Code?
Run `npx skills add merill/msgraph`. Without the Skills CLI, download `msgraph.zip` from the latest release and unzip it into `~/.claude/skills/`.
Is authentication needed to search the API?
No, the three search commands run locally without sign-in. `msgraph auth signin` is needed only for `graph-call`.
Can the skill change data in Microsoft 365?
Yes, but writes are guarded: GET requests are allowed right away while modifying operations need explicit confirmation. Call permissions are limited by what you granted at sign-in.
Does the skill work together with an MCP server?
Yes, it is compatible with Lokka (lokka.dev) and any other Graph MCP server. The skill finds and checks the query and hands execution to the server.
Which environment variables configure the skill?
`MSGRAPH_CLIENT_ID` replaces the application ID, `MSGRAPH_TENANT_ID` sets the tenant (default `common`), `MSGRAPH_API_VERSION` picks `beta` or `v1.0` (default `beta`), and `MSGRAPH_NO_TOKEN_CACHE` stops tokens from being saved to disk.
Discussion
No questions or reviews yet.
Related
SkillsMCP server for Microsoft Graph and Azure: run a Microsoft 365 tenant in plain language, from Entra groups to Azure costs
Microsoft Learn skills for nearly every Azure service: limits, configuration, security, architecture and troubleshooting with doc links
Microsoft Agent Skills
Agent Skills
Official Microsoft skills that ground coding agents in Azure SDKs and Foundry for Python, .NET, TypeScript, Java and Rust
A GPU profiler for AI agents: the agent runs vLLM or SGLang under graphsignal-run, reads the metrics and tunes flags for speed
Skills and a CLI that teach an agent to draw valid draw.io diagrams for AWS, Azure, GCP, Databricks and BPMN with structure checks
A collection of Copilot skills and agents for Azure, API Management, Terraform and diagrams, installed via the skills CLI or APM
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| msgraph (this card) | no | 119 | ||
| Microsoft Agent Skills | no | 3,177 | a set of skills for Microsoft SDKs and services in development | |
| Microsoft Learn MCP Server | yes | not required | 1,975 | searches Microsoft Learn documentation through MCP and does not call Graph |
README in short
The README explains the problem of stale model knowledge about Graph and the solution as local indexes, then gives an index table, a feature list and a quick start. Separate sections cover environment variables, building from Go 1.22 sources and the project structure.
README badge
Original SKILL.md
--- name: msgraph description: Up-to-date Microsoft Graph API knowledge for AI agents. Search 27,700+ Graph APIs, endpoint docs, resource schemas, and community samples — all locally, no network calls. Use when the agent needs to find, understand, or call Microsoft Graph endpoints. license: MIT metadata: author: merill version: "1.0.19" --- # Microsoft Graph Agent Skill Search, look up, and call any of the 27,700+ Microsoft Graph APIs — all locally, no network calls needed. Use the three search commands to find the right endpoint, check permissions and parameters, then optionally execute calls directly or hand off to a Graph MCP server. ## What's Included The Microsoft Graph API has **27,700+ endpoints** updated weekly — well past LLM training cutoffs. This skill bundles the complete API surface as local indexes that you search instantly with no network calls. | Index | Count | What it contains | |---|---|---| | OpenAPI endpoints | 27,700+ | Path, method, summary, description, permission scopes | | Endpoint docs | 6,200+ | Permissions (delegated/app), query parameters, required headers, default vs `$select`-only properties | | Resource schemas | 4,200+ | All properties with types, supported `$filter` operators, default/select-only flags | | Community samples | Growing | Hand-verified queries mapping natural-language tasks to exact API calls | ## How to Run The `msgraph` CLI is bundled with this skill. Run all commands through the launcher script in this skill's directory: - **macOS / Linux**: `bash <path-to-this-skill>/scripts/run.sh <command> [args...]` - **Windows**: `powershell <path-to-this-skill>/scripts/run.ps1 <command> [args...]` For example, to search for mail-related APIs on macOS: ``` bash /home/user/.opencode/skills/msgraph/scripts/run.sh openapi-search --query "send mail" ``` In all examples below, `msgraph` is shorthand for the full launcher invocation. ## Finding the Right API This is the primary purpose of the skill. Follow this progressive lookup strategy — each level adds detail: 1. **Your own knowledge** — try first for well-known endpoints (`/me`, `/users`, `/groups`). 2. **`sample-search`** — curated, hand-verified samples. Highest quality. Use for common tasks and multi-step workflows.