gitColinX

M365 Graph Agent Ops — Development skill for Claude Code

Development community

Microsoft Graph, Entra ID, Intune and Exchange Online admin from Claude Code: delegated device code sign-in I complete in my own browser, a read-only-by-default REST layer, and read-back after every w.

How to install M365 Graph Agent Ops

This entry records only its repository, not the path inside it, so there is no exact command to give. Open gitColinX/m365-graph-agent-ops and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What M365 Graph Agent Ops does

Microsoft Graph, Entra ID, Intune and Exchange Online admin from Claude Code: delegated device code sign-in I complete in my own browser, a read-only-by-default REST layer, and read-back after every write.

Alternatives in Development

  • Flavor — PUA 切换味道 — 从 15 种味道中选择,包括阿里/字节/华为/腾讯/Netflix/Musk/Jobs/Microsoft/钉内钉外 19.5k ★
  • Internet Court Skill — The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 4.9k ★
  • Backlinks — Check backlink credits and targets, and explain how the exchange works 195 ★

README

Microsoft 365 admin from Claude Code, with me holding the sign-in

How I ran Microsoft Graph, Entra ID, Intune and Exchange Online administration from Claude Code at my employer, a hybrid Microsoft 365 tenant of about 1,100 devices, in 2026. The agent never saw a password or an MFA prompt. Its sign-ins were delegated device code sign-ins that I completed in my own browser, under my own MFA and Conditional Access, and the rule for every write was the same: read it back.

This repo is a fresh rewrite, generalized from what I ran at work: the narrative, the sign-in code, the tools, the guardrails, the outcomes, and four case studies, including the one where my own write went wider than I meant it to. The code is new and generic, tested offline against synthetic fixtures. Employer, people, ticket numbers and tenant identifiers are removed. The case studies are what happened, with identifying details generalized.

              me, in my own browser: sign-in, MFA, Conditional Access
                                   ^
                                   | user code, relayed by the agent within seconds
                                   |
Claude Code --> auth/Start-DeviceLogin.ps1 --(detached child)--> login.microsoftonline.com
                                   |                               RFC 8628 device authorization grant
                                   v
                 access token only, DPAPI-encrypted, 50 minutes, no refresh token
                                   |
       tools/*.ps1, recipes/*.ps1, tools/Start-QueueWorker.ps1 (one sign-in, many steps)
                                   |
         Graph REST (read-only unless -Apply)  |  Connect-MgGraph -AccessToken  |  Connect-ExchangeOnline -AccessToken
Sign-in `auth/` and the reasoning in `auth/README.md`
Tools `tools/`: read-only Graph runner, Intune forensics, Remediations export, Win32 app PATCH, agent app registration