Best for
- Use when accessing Microsoft 365 data (users, mail, calendar, Teams, files, SharePoint) from any application type.
github/awesome-copilot/skills/msgraph-sdk/SKILL.md
Integrate Microsoft Graph SDK into any project — .NET, TypeScript/JavaScript, or Python. Covers auth patterns (client credentials, OBO, managed identity), SDK setup, calling Graph APIs, batching, delta queries, change notifications, throttling, and permission scopes. Use when accessing Microsoft 365 data (users, mail, calendar, Teams, files, SharePoint) from any application type.
Decision brief
Use this skill when integrating Microsoft Graph into an application to access Microsoft 365 data and services.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/github/awesome-copilot --skill "skills/msgraph-sdk"Inspect the Agent Skill "msgraph-sdk" from https://github.com/github/awesome-copilot/blob/9933dcad5be5caeb288cebcd370eeeb2fc2f1685/skills/msgraph-sdk/SKILL.md at commit 9933dcad5be5caeb288cebcd370eeeb2fc2f1685. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Always construct GraphServiceClient once and reuse it (it manages token caching internally).
1. Determine the target language and read the matching reference file. 2. Identify the auth scenario and choose the correct flow from the table above. 3. Fetch current SDK docs and Graph Explorer examples before making implementation choices. 4. Apply least-privilege permissions…
1. Use the .NET workflow when the project contains .cs, .csproj, or .sln files, or when the user asks for C guidance. Follow references/dotnet.md. 2. Use the TypeScript / JavaScript workflow when the project contains package.json, .ts, or .js files, or when the user asks for Nod…
Microsoft Graph overview:
Selecting the wrong auth flow is the most common Graph integration mistake. Apply this decision tree before writing any auth code:
Permission review
The documentation includes network, browsing, or remote request actions.
Use Microsoft Docs MCP tooling when available to fetch current API shapes and SDK samples.The documentation includes network, browsing, or remote request actions.
Combine up to 20 independent Graph calls into a single HTTP request using the `$batch` endpoint. Use batching when:The documentation asks the agent to read local files, directories, or repositories.
Determine the target language and read the matching reference file.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 80/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 37,126 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use this skill when integrating Microsoft Graph into an application to access Microsoft 365 data and services.
Always ground implementation in the current Microsoft Graph SDK documentation and SDK version for the target language rather than relying on memory alone.
.cs, .csproj, or .sln files, or when the user asks for C# guidance. Follow references/dotnet.md.package.json, .ts, or .js files, or when the user asks for Node.js / browser guidance. Follow references/typescript.md..py, pyproject.toml, or requirements.txt, or when the user asks for Python guidance. Follow references/python.md.Selecting the wrong auth flow is the most common Graph integration mistake. Apply this decision tree before writing any auth code:
| Scenario | Flow to use |
|---|---|
| Background service / daemon with no user | Client credentials (app-only) |
| Agent or API acting on behalf of a signed-in user | On-Behalf-Of (OBO) |
| App running in Azure (Function, Container App, VM) | Managed Identity (preferred over secrets) |
| CLI tool or local dev script | Device code or interactive browser |
| Single-page app (browser only) | Authorization code + PKCE |
DefaultAzureCredential in Azure-hosted apps; it tries managed identity first and falls back gracefully for local dev.Always construct GraphServiceClient once and reuse it (it manages token caching internally).
Pass a credential from the Azure Identity library — never build raw HTTP clients manually.
client.Users[userId].Messages.GetAsync(...).await async calls.$select to limit returned fields — Graph returns large default payloads.$filter server-side rather than filtering returned collections in memory.$expand to fetch related resources in a single call when relationships are small.Graph paginates collections. Never assume all items arrive in one response:
@odata.nextLink on the response.PageIterator helper (available in all three SDKs) to walk pages automatically.$top to control page size (max varies by resource, typically 999).Combine up to 20 independent Graph calls into a single HTTP request using the $batch endpoint. Use batching when:
Batch responses arrive out of order — match them by the id field you assigned each request.
Use delta queries to sync changes incrementally instead of polling full collections:
GET /users/delta returns all items + a @odata.deltaLink.deltaLink to receive only what changed since the last sync.deltaLink durably (database, blob) between sync runs.Subscribe to resource changes with POST /subscriptions:
expirationDateTime (max varies by resource; typically 1–3 days for mail/calendar, up to 4230 minutes for users/groups).validationToken query parameter on creation — echo it back as plain text with HTTP 200.notificationUrl + lifecycleNotificationUrl) to handle missed events and reauthorization.Graph throttles aggressively. Always handle HTTP 429:
Retry-After header — it specifies exact seconds to wait, not a fixed backoff.Get permissions right before writing auth code — wrong scopes result in 403 errors that are hard to debug later.
| Goal | Resource path |
|---|---|
| Get signed-in user's profile | GET /me |
| List user's mailbox messages | GET /me/messages |
| Send an email | POST /me/sendMail |
| List calendar events | GET /me/events |
| Get user's OneDrive root | GET /me/drive/root/children |
| List Teams the user is in | GET /me/joinedTeams |
| Post a Teams channel message | POST /teams/{id}/channels/{id}/messages |
| List SharePoint site lists | GET /sites/{siteId}/lists |
| Search across M365 | POST /search/query |
| List all users in tenant (app-only) | GET /users |
| Get group members | GET /groups/{id}/members |
In similar fashion, use the SDK's fluent API to navigate to these resources in code.
GraphServiceClient is constructed once and reused.Retry-After logic.Alternatives
K-Dense-AI/scientific-agent-skills
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Jeffallan/claude-skills
Use when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke to create REST endpoints, define Pydantic models, implement authentication flows, set up async SQLAlchemy database operations, add JWT authentication, build WebSocket endpoints, or generate OpenAPI documentation. Trigger terms: FastAPI, Pydantic, async Python, Python API, REST API Python, SQLAlchemy async, JWT authentication, OpenAPI, Swagger Python.
K-Dense-AI/scientific-agent-skills
Predict regulatory features, gene structure, and expression directly from DNA sequence using Genomic Intelligence's hosted transformer DNA language models — no local GPU or model weights. Six tasks over a REST API and a hosted MCP server (keyless public demo): promoter regions, splice donor/acceptor sites, enhancer activity, chromatin state, sequence-to-expression (log TPM), and de-novo gene annotation, plus a composite find-genes-then-predict-expression workflow. Use when the user has a gene sy
MoizIbnYousaf/marketing-cli
Build applications and agents with Exa's API Platform: search, contents, answer, context, Agent API, monitors, websets, OpenAI-compatible endpoints, and exa-py / exa-js. Use when choosing Exa endpoints, writing Exa API calls, integrating semantic web search or research into products, or debugging Exa request shapes. Load references/ on demand for endpoint details.