microsoft-integration

Access Microsoft 365 mail, calendar, OneDrive, and directory via the Graph API.

1|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/tapway/shogun-os --skill microsoft-integration-tapway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: microsoft-integration
Source: https://github.com/tapway/shogun-os/tree/main/skills/workspace/microsoft-integration
Command: npx skills add https://github.com/tapway/shogun-os --skill microsoft-integration-tapway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve? Automating Microsoft 365 workflows normally requires writing custom OAuth and Graph API code for every task. This Skill provides a ready-made client and CLI for mailbox search and send, calendar listing, OneDrive browsing, and Azure AD directory lookups using client credentials, with no interactive login required. ## Core Features & Use Cases - Mail Operations: Search mailboxes, retrieve individual messages, and send email on behalf of any user, all returning JSON output. - Calendar & OneDrive Access: List upcoming calendar events over a configurable day range and browse or search OneDrive files. - Directory Lookups: Fetch user profiles and list directory users with fields like displayName, mail, jobTitle, and department. - Use Case: An operations agent needs to find the latest budget email, check a manager's calendar for the next 30 days, and locate a quarterly report in OneDrive — all from one automated background workflow without user sign-in. ## Quick Start Set the MSFT_TENANT_ID, MSFT_CLIENT_ID, and MSFT_CLIENT_SECRET environment variables, then ask the agent to search a user's mailbox for recent messages about a specific topic.

Frequently Asked Questions about microsoft-integration

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

FAQPage Schema
How do I search a Microsoft 365 mailbox with the Graph API?

Use the mail search command with a user UPN and query string, which calls the Graph API /messages endpoint with $search and returns JSON results. You can limit results with the --max flag, defaulting to 10 messages.

How to send email from Python using Microsoft Graph client credentials?

Register an Azure AD app with Mail.Send application permission, grant admin consent, then call the /sendMail endpoint with a message payload containing subject, body, and recipients. The GraphClient class handles token acquisition and caching automatically.

Does Microsoft Graph client credentials flow require user login?

No, the client credentials flow authenticates the app itself against login.microsoftonline.com using tenant ID, client ID, and client secret. It is designed for background and automated workflows with no interactive sign-in.

Why do I get 403 Forbidden on Microsoft Graph API calls?

A 403 error means the required application permissions were not granted or admin consent is missing. Add the needed Microsoft Graph application permissions in the Azure Portal and click Grant admin consent for the tenant.

Can I use this for Google Workspace or delegated user auth?

No, this client only supports Microsoft 365 via client credentials. For Google Workspace tenants use the google-workspace skill, and for delegated per-user auth flows a different OAuth approach is required.