m365-cli_skill

This skill helps you manage Microsoft 365 tasks from the command line, including email, calendar, OneDrive, and SharePoint operations.
  • Python

2.5k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill m365-cli

  • _meta.json263 B
  • SKILL.md5.2 KB

Overview

This skill provides command-line access to Microsoft 365 user-level services using the m365 CLI. It enables sending, reading, and searching mail; managing calendar events; browsing and transferring OneDrive and SharePoint files; and resolving users and contacts. The skill focuses strictly on user-level operations and excludes tenant, Azure, Entra ID, and Intune administration tasks.

How this skill works

The skill invokes the m365 binary to run CLI commands and returns human-readable or JSON-formatted results. It authenticates via the device code flow and stores tokens locally; scopes can be adjusted by re-running login with additional scopes. Sensitive actions include confirmable prompts (send, delete, share) and an email-body whitelist that hides content from untrusted senders unless explicitly forced.

When to use it

  • Send, read, or search Microsoft 365 email from automation or scripts
  • Create, list, update, or delete calendar events for a user account
  • Upload, download, list, or share files in OneDrive
  • Browse SharePoint sites, lists, and files when Sites.ReadWrite.All is granted
  • Resolve users and contacts within an organization or personal contacts

Best practices

  • Keep credentials and tokens in the default local directory (~/.m365-cli) and do not expose them publicly
  • Re-login with --add-scopes Sites.ReadWrite.All before using SharePoint commands that require extra permission
  • Confirm recipients and message content before sending emails; use prompts for safety
  • Manage trusted senders via the trusted-senders.txt whitelist to prevent accidental exposure of email bodies
  • Use --json for structured output when integrating with automation or downstream tools

Example use cases

  • Automate inbox search and download of attachments from trusted senders
  • Create and update calendar events for team schedules via script
  • Upload large files to OneDrive with automatic chunking and generate share links
  • List SharePoint site files and download artifacts after adding Sites.ReadWrite.All scope
  • Search and resolve user contact details for integrations or directory lookups

FAQ

Login uses the device code flow (m365 login). Tokens are stored locally and auto-refresh; re-run login to adjust scopes or change a custom Azure AD app via environment variables.

Why can’t I read an email body?

Email bodies are shown only for senders on the trusted-senders whitelist (~/.m365-cli/trusted-senders.txt). Use --force to bypass the whitelist temporarily but exercise caution.

How do I access SharePoint features?

SharePoint commands require Sites.ReadWrite.All. Re-run m365 login with --add-scopes Sites.ReadWrite.All, then retry the commands.

Can this manage tenant or Azure resources?

No. This skill is limited to user-level Microsoft 365 operations and does not perform tenant-level admin, Azure resource, Entra ID administration, or Intune device management.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational