aai-cli Microsoft Graph
SkillFiles & storageLets your agent manage Microsoft 365 mail, calendars, files, Teams, and tasks through one command-line tool.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the aai-cli Microsoft Graph skill
About this skill
Work with Microsoft 365 through aai-cli by choosing the right Microsoft service and resource model, then using durable Graph credentials for Outlook, OneDrive, SharePoint, Teams, Excel, To Do, and Planner workflows.
What this skill tells your AI
The instructions your AI receives, as published by aai-labs/agent-barn in api/domains/agents/aai_cli_skills/bundled/skills/aai-microsoft/SKILL.md and read by ahel’s review.
Use this skill for Microsoft 365 work through aai-cli microsoft. Start from the user's intent and Microsoft 365 ownership model, not from the command list. Read the concepts reference before a cross-service or file-editing workflow.
Choose the service first
- Outlook / Exchange owns a user's mail, calendar, and contacts. Use it for communication and scheduling tied to a mailbox.
- OneDrive is a user's personal work-file area. Use it for files owned or staged by one user, even when those files may later be shared.
- SharePoint is the shared content layer. A site contains document libraries (
driveresources) for files and lists for structured rows/columns. Use document-library file commands for shared documents; use list-item commands for records such as requests, assets, or statuses. - Teams is the collaboration/conversation layer over teams and channels. Read channel messages and membership there, but treat channel files as SharePoint content. A standard channel uses the team's SharePoint site; private and shared channels can use separate sites.
- Microsoft To Do is user-centered personal task management. Use it when the task belongs in one user's lists and daily workflow.
- Planner is shared plan/task management, commonly attached to a Microsoft 365 group or Team. A plan contains buckets, and buckets organize tasks.
- Microsoft Graph is the common API surface across these products. Use
microsoft requestonly when the needed Graph operation lacks a typed command.
Excel and Word are different kinds of files
- Excel workbooks:
microsoft excelcalls the documented Graph workbook API for worksheets, ranges, tables, and table rows. It requires a delegated profile withFiles.ReadWriteaccess; application profiles are rejected because Graph does not support application permissions for workbook operations. For SharePoint workbooks, pass the document-library--drive-id. - Word documents: Graph exposes
.docxfiles asdriveItemcontent, not as paragraphs or tables. There is nomicrosoft wordeditor in this CLI. Download the file withmicrosoft filesormicrosoft sharepoint files, edit it with an external library/program, then upload the complete replacement. Consider a backup, version history, concurrent edits, and features the external library may not preserve. - Teams files: channel files are SharePoint files, so use the SharePoint file workflow rather than treating them as Teams messages.
Read Microsoft 365 concepts and routing before acting when the request crosses products, refers to a Team or SharePoint URL rather than IDs, or leaves ownership/visibility ambiguous. It explains resource relationships, identifier choice, auth choice, and common workflows.
Confirm the active profile or pass --profile. App-only profiles are best for unattended organization-owned automation. Delegated profiles act on behalf of one user and are required by this CLI for complete Microsoft To Do CRUD. Both obtain short-lived access tokens automatically from credentials saved in the encrypted secret store; never request or copy an access token into a command.
Prefer typed commands for supported operations. Use microsoft request only for a Graph endpoint without a typed command. Writes through request require --allow-write.
Most user resources accept --user-id; otherwise they use profile.user_id. IDs belong to different resource types and are not interchangeable: a Team/group ID is not a site, drive, list, channel, plan, or bucket ID. SharePoint list commands require site and list IDs. Use microsoft files for OneDrive and the explicit microsoft sharepoint files commands with --drive-id for a SharePoint document library. Use microsoft excel with --item-id or --path for workbook operations. Planner task update/delete require the current @odata.etag from a preceding get/create/update response.
Treat creates, sends, updates, and deletes as external side effects. Read the target first when practical, use stable identifiers, and report what changed. Supply request bodies through --json PATH or --json - for complex or sensitive values rather than shell-inline JSON.
List commands aggregate Graph pages up to --limit and return the provider's value array. Successful output is JSON on stdout; errors are structured JSON on stderr. Downloaded file bytes go only to --output.
See the command reference only after choosing the service/resource. It contains exact command shapes, bodies, and mutation mechanics.
Signals
- GitHub stars
- 105
- Forks
- 8
- Last commit
- Sep 2026
ahel review
S4info
community integration, published by aai-labs, not microsoft
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Catalog kind
- skill
- Key
aai-microsoft- Source
- github.com/aai-labs/agent-barn