Introduction
msgraph is an Agent Skill that gives AI agents up-to-date knowledge of the complete Microsoft Graph API and optionally executes API calls directly.
Quick Install
Section titled “Quick Install”Option 1: Using skills.sh
Section titled “Option 1: Using skills.sh”npx skills add merill/msgraphOption 2: Download and unzip
Section titled “Option 2: Download and unzip”Unzip and copy the msgraph folder into the .agents/skills/ folder of your project or agent platform.
your-project/└── .agents/ └── skills/ └── msgraph/ └── SKILL.mdSee the Installation page for other agent platforms and global install options.
The Problem
Section titled “The Problem”Large language models are trained on data that is months — sometimes over a year — old. The Microsoft Graph API has 27,700 Graph APIs and is updated weekly. New APIs ship, existing endpoints change, and features get deprecated — but your agent’s training data doesn’t reflect any of it.
Without current API knowledge, agents:
- Hallucinate endpoints that don’t exist or have been renamed
- Use deprecated paths instead of the current ones
- Miss required permissions or headers (like
ConsistencyLevel: eventual) - Get the
$filtersyntax wrong for queries that actually work differently - Don’t know about new features shipped after their training cutoff
This skill solves that by bundling the complete Microsoft Graph API surface as local indexes — searchable instantly with zero network calls.
| What’s included | 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 |
All indexes are bundled with the skill and run entirely locally — no API calls, no latency. Results come back in milliseconds.
What it does
Section titled “What it does”- Searches 27,700 Graph APIs — all locally, instantly
- Provides curated community samples that map natural-language tasks to exact Microsoft Graph API queries
- Works with Microsoft Graph MCP servers (like lokka.dev) — this skill provides the knowledge, your MCP server handles execution
- Authenticates and executes Microsoft Graph API calls directly when no MCP server is available — delegated (interactive browser / device code) and app-only (client secret, certificate, managed identity, workload identity federation)
- Enforces safety — read-only by default, writes require explicit opt-in, DELETE is always blocked
How agents use it
Section titled “How agents use it”When an agent loads this skill, it gets instructions and a CLI to:
- Search for the right endpoint, permissions, and syntax using local indexes
- Construct correct Microsoft Graph API calls using up-to-date knowledge
- Execute via a Graph MCP server or directly through this skill’s built-in auth and API execution
Authentication only happens when the agent needs to execute API calls directly — not when using the skill purely for knowledge and search.
What you can ask your agent
Section titled “What you can ask your agent”Once the skill is installed, you can ask your agent things like:
Email & Calendar
Section titled “Email & Calendar”- Show me my unread emails from today
- Send an email to the marketing team about the Q3 review meeting
- What meetings do I have tomorrow?
- Find all emails from Sarah with attachments from the last week
Teams & Chats
Section titled “Teams & Chats”- List all the teams I’m a member of
- Post a welcome message in the General channel of the Design team
- Show me my recent chat messages
Files & SharePoint
Section titled “Files & SharePoint”- List the files in my OneDrive root folder
- Find the latest documents in the Marketing SharePoint site
- What lists are on our team site?
Planner & To Do
Section titled “Planner & To Do”- Show me my tasks that are due this week
- Create a new plan called ‘Product Launch’ with buckets for Design, Dev, and QA
Entra ID & Identity
Section titled “Entra ID & Identity”- List all users whose display name starts with ‘John’
- Show me all the conditional access policies that exclude the emergency access account
- Create a new security group called ‘Sales Team’
Intune & Devices
Section titled “Intune & Devices”- Show me all managed devices that are non-compliant
- List the device configuration policies assigned to the ‘Call Center’ group
Security & Compliance
Section titled “Security & Compliance”- Show me the latest security alerts
- What is our current secure score?
- Pull the sign-in logs from the last 24 hours
Knowledge Queries (no auth needed)
Section titled “Knowledge Queries (no auth needed)”- What permissions do I need to read user calendars?
- What
$filteroperators does theuserresource support? - Find the Microsoft Graph API endpoint for managing conditional access policies
- What properties does the
managedDeviceresource have?