m365-runbook

Diagnoses and resolves Microsoft 365 integration failures across Teams, Outlook, SharePoint, and Graph API.

1|Updated May 13, 2026
One-click install
npx skills add https://github.com/coolrobertj/Agency-Cowork --skill m365-runbook-coolrobertj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: m365-runbook
Source: https://github.com/coolrobertj/Agency-Cowork/tree/main/skills/m365-runbook/skills/m365-runbook
Command: npx skills add https://github.com/coolrobertj/Agency-Cowork --skill m365-runbook-coolrobertj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Microsoft 365 integrations fail in many ways — expired MCP auth tokens, stale Teams caches, broken SharePoint downloads, DRM-wrapped files, and Playwright session issues. This Skill provides systematic troubleshooting runbooks so failures get diagnosed and fixed before escalating to the user. ## Core Features & Use Cases - Eight Targeted Runbooks: Covers MCP authentication failures, Graph API message ID encoding errors, Teams cache staleness, SharePoint download failures, DRM/encrypted file handling, Classic vs. New Outlook conflicts, Playwright session issues, and Teams Monitor PTY failures on macOS. - Diagnostic-First Approach: Each runbook starts with concrete diagnostic commands (process checks, cache status, file header inspection) before prescribing resolutions. - Use Case: When a user reports "Teams isn't working" or an email send fails with a Graph API error, follow the relevant runbook to check the MCP server process, refresh the Teams cache, or fall back to the Outlook COM script — resolving the issue without user escalation. ## Quick Start Troubleshoot why my Teams messages are failing and fix the underlying M365 integration issue.

Frequently Asked Questions about m365-runbook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix MCP authentication failures with Microsoft 365?

Check whether the MCP server process is running, inspect its logs for auth errors, and verify the Azure AD session is active. Restart the MCP server and have the user re-authenticate via browser; delegated refresh tokens typically expire after 90 days.

Why does Graph API return "Resource not found for the segment" on message operations?

Base64-encoded message IDs contain forward slashes that Graph API misinterprets as URL path separators. Fall back to the Outlook COM script, search by subject or sender to get the entryId, then use the Reply or Forward action.

How do I fix stale Teams cache when a chat is not found?

Check cache age with the cache-manager status command; if lastRefreshed is older than four hours, run a forced refresh. Newly created chats may not be cached yet, so use ListChats with a userUpns filter and then add the chat to the cache.

Can DRM-protected PowerPoint or Excel files be edited on macOS?

No. DRM handling requires Office COM automation, which is Windows-only. On macOS, edit the file in Office Online, transfer it to a Windows machine for COM-based processing, or ask the owner for an unprotected copy.

Why do Outlook COM scripts fail with New Outlook installed?

COM automation only works with Classic Outlook (OUTLOOK.EXE); New Outlook (olk.exe) does not support it. Ask the user to toggle off New Outlook in the app and wait for Classic Outlook to fully start before retrying.

What are the limitations of this troubleshooting approach?

The runbooks cannot fix server-side issues like revoked Azure AD app permissions or changed Conditional Access policies, which require admin portal access. DRM editing and COM automation are also unavailable on macOS.