{"skill":{"slug":"m365-calendar","displayName":"M365 Calendar (Graph)","summary":"Microsoft 365 calendar automation via Microsoft Graph for both M365 Business (work/school) and M365 Home/Consumer (hotmail.com/outlook.com). Use when listing...","description":"---\nname: m365-calendar\ndescription: MS365 / Microsoft365 calendar automation via Microsoft Graph for Microsoft 365 (M365) Business (work/school, Exchange Online) and M365 Home/Consumer (hotmail.com, outlook.com, live.com). Use when listing upcoming events, searching calendar entries (e.g. “Lunch”), checking attendee response status (accepted/declined/tentative), creating or updating meetings, moving events to a new time, or troubleshooting Graph/MSAL auth/token cache for calendar access. Related keywords: OneDrive, SharePoint, Exchange Online (calendar). Privacy note: no third-party API key is required; authentication is via your own Microsoft login (device code) and tokens are stored locally per profile. **Token cost:** ~600-1.5k tokens per use (skill body ~2-3k tokens, Graph calls + light parsing).\n---\n\n# M365 Calendar (Microsoft Graph)\n\nKeep this skill lean: do the heavy lifting with the bundled scripts.\n\n## Installation / runtime requirements\n\n- Requires **Node.js** (the scripts are Node ESM).\n- This skill declares its npm dependency in `package.json`.\n- After installing/updating the skill, install deps in the skill folder:\n\n```bash\ncd skills/m365-calendar\nnpm install\n```\n\n## Security / boundaries\n\n- Never commit or share token caches or client secrets.\n- Default secret location (per machine): `~/.openclaw/secrets/m365-calendar/`\n\n## Quick start\n\n### 0) First question: do you want to connect **M365 Business** or **M365 Home/Consumer**?\n\n- **M365 Home/Consumer** = `hotmail.com`, `outlook.com`, `live.com`\n- **M365 Business** = Work/School account (Exchange Online)\n\n### 1) Privacy / keys (important)\n- **No third-party API key required.**\n- Auth is done via **your own Microsoft login** (device code flow).\n- Tokens are stored **locally per profile** on the machine running OpenClaw.\n- By default, the setup flow does **NOT** request `offline_access` (to avoid long-lived refresh tokens on disk). Use `--offline` only if you explicitly want background refresh.\n\n### 2) You need an **App (client) ID**\nYou must pass `--clientId`.\n\n- **Home/Consumer:** create an app registration that allows **Personal Microsoft accounts**, and enable **public client flows**.\n- **Business (users without IT admin rights):** ask IT for a `clientId` + consent (see “Business note” below).\n\n### 3) One-command setup (recommended)\n\n```bash\n# Consumer / home accounts (hotmail.com / outlook.com)\nnode skills/m365-calendar/scripts/setup.mjs \\\n  --profile home \\\n  --tenant consumers \\\n  --email you@outlook.com \\\n  --clientId <YOUR_APP_CLIENT_ID> \\\n  --tz Europe/Vienna\n\n# Business / work accounts\nnode skills/m365-calendar/scripts/setup.mjs \\\n  --profile business \\\n  --tenant organizations \\\n  --email you@company.com \\\n  --clientId <IT_PROVIDED_CLIENT_ID> \\\n  --tz Europe/Vienna\n```\n\n### 2) Use\n\n```bash\nnode skills/m365-calendar/scripts/list.mjs --profile home --when today --tz Europe/Vienna\nnode skills/m365-calendar/scripts/list.mjs --profile home --when tomorrow --tz Europe/Vienna\nnode skills/m365-calendar/scripts/search.mjs --profile home --when tomorrow --tz Europe/Vienna --query \"Mittagessen\"\n```\n\n2) List remaining events today (Europe/Vienna):\n\n```bash\nnode skills/m365-calendar/scripts/list.mjs --profile tom-business --when today --tz Europe/Vienna\n```\n\n3) Search and show attendee responses:\n\n```bash\nnode skills/m365-calendar/scripts/search.mjs --profile tom-business --query \"Mittagessen\" --when tomorrow --tz Europe/Vienna\nnode skills/m365-calendar/scripts/get-event.mjs --profile tom-business --id <EVENT_ID> --tz Europe/Vienna\n```\n\n4) Move an event to a new time:\n\n```bash\nnode skills/m365-calendar/scripts/move-event.mjs --profile tom-business --id <EVENT_ID> \\\n  --start \"2026-02-19T12:30\" --end \"2026-02-19T13:00\" --tz Europe/Vienna\n```\n\n## Operational workflow (recommended)\n\nWhen the user asks to change a meeting:\n\n1) Identify the event deterministically (search by day-range + subject; confirm ID).\n2) Read the event and report attendee response statuses.\n3) Patch start/end.\n4) Re-read the event and confirm the final start/end + any response resets.\n\n## Notes on Business vs Home (Consumer)\n\n- Use `--tenant organizations` for work/school accounts (most “business” tenants).\n- Use `--tenant consumers` for hotmail/outlook.com personal accounts.\n- Use `--tenant common` only if you explicitly want one profile that can log into either type.\n\n### Consumer (hotmail/outlook.com) requirements\nYour app registration must:\n- Allow **personal Microsoft accounts**\n- Enable **public client flows** (otherwise device-code can fail with errors like AADSTS70002)\n\n### Business note (users without IT admin rights)\nMany tenants block:\n- creating app registrations as a normal user\n- user consent to new apps\n\nIn that case the skill can still work for Business accounts, but only if your **IT/SysAdmin** provides a `clientId` for an app registration configured with:\n- Account type: organizational accounts (or org+personal)\n- Delegated Microsoft Graph permissions: `Calendars.Read`, `Calendars.ReadWrite`, `offline_access`\n- **Public client flows enabled** (Device Code)\n- (Often required) **Admin consent granted** for the above permissions\n\nIf you don’t get such a `clientId`/consent from IT, you can still use the skill with a **Consumer** account (hotmail/outlook.com), but your Business calendar will remain blocked.\n\nIf silent token acquisition fails, re-run `setup.mjs` for that profile.\n","topics":["Calendar","Privacy","Business","Home"],"tags":{"latest":"0.1.9"},"stats":{"comments":0,"downloads":412,"installsAllTime":15,"installsCurrent":0,"stars":0,"versions":8},"createdAt":1771413621003,"updatedAt":1778991424076},"latestVersion":{"version":"0.1.9","createdAt":1771421485467,"changelog":"Security scan coherence: document Node.js + npm install requirements; package.json already included.","license":null},"metadata":null,"owner":{"handle":"tradmangh","userId":"s17aaegq3rafytyraeyc72bkjx83twpg","displayName":"Thomas J. Radman","image":"https://avatars.githubusercontent.com/u/4415781?v=4"},"moderation":null}