Office 365 / Outlook connector for email (read/send), calendar (read/write), and contacts (read/write) using resilient OAuth authentication. NOW WITH MULTI-ACCOUNT SUPPORT! Manage multiple Microsoft 365 identities from a single skill. Solves the difficulty connecting to Office 365 email, calendar, and contacts. Uses Microsoft Graph API with comprehensive Azure App Registration setup guide. Perfect for accessing your Microsoft 365/Outlook data from OpenClaw.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Office 365 / Outlook connector for email (read/send), calendar (read/write), and contacts (read/write) using resilient OAuth authentication. NOW WITH MULTI-ACCOUNT SUPPORT! Manage multiple Microsoft 365 identities from a single skill. Solves the difficulty connecting to Office 365 email, calendar, and contacts. Uses Microsoft Graph API with comprehensive Azure App Registration setup guide. Perfect for accessing your Microsoft 365/Outlook data from OpenClaw.
Office 365 Connector (Multi-Account Enhanced)
Overview
This skill provides resilient, production-ready connection to Office 365 / Outlook services including email, calendar, and contacts. Now with multi-account support (v2.0.0), you can manage multiple Microsoft 365 identities (work, personal, consulting, etc.) from a single skill installation.
It solves the common challenge of connecting to Office 365 from automation tools by providing OAuth authentication, automatic token refresh, per-account isolation, and comprehensive Azure App Registration setup guidance.
Perfect for:
Managing multiple work identities across organizations
Separating personal and professional email/calendar
Accessing shared mailboxes and delegated calendars
Consultants and freelancers working across multiple clients
New in v2.0.0: Multi-account support! See MULTI-ACCOUNT.md for complete usage guide.
cd skills/office365-connector
# Add account
node accounts.js add work <tenant-id> <client-id> <client-secret> you@work.com "Work account"# Authenticate
node auth.js login --account=work
Add More Accounts
# Add personal account
node accounts.js add personal <tenant> <client> <secret> you@outlook.com "Personal"# Add consulting account
node accounts.js add consulting <tenant> <client> <secret> you@client.com "Consulting"# Set default
node accounts.js default work
# List all accounts
node accounts.js list
Use Your Accounts
# Check work calendar
node calendar.js today --account=work
# Read personal emails
node email.js recent 10 --account=personal
# Send from consulting account
node send-email.js send client@example.com "Subject""Body" --account=consulting
Migrate from Single-Account Setup
Already using v1.0.0? No problem!
# Import your existing setup
node accounts.js import-legacy
# Continue using without changes (environment variables still work)# OR add additional accounts
node accounts.js add secondary <tenant> <client> <secret>
Prerequisites
Before using this skill, you must complete the Azure App Registration setup to obtain:
Tenant ID - Your Azure AD tenant identifier
Client ID - Your application (client) ID
Client Secret - Your application secret value
Setup time: ~10-15 minutes per account
See Setup Guide for complete step-by-step instructions.
Permission Validation
This skill requires the following delegated permissions (user consent required):
Email Permissions
Mail.Read - Read user email
Mail.ReadWrite - Read and write access to user email
Mail.Send - Send email as the user
Calendar Permissions
Calendars.Read - Read user calendars
Calendars.ReadWrite - Read and write access to user calendars
Contact Permissions
Contacts.Read - Read user contacts
Contacts.ReadWrite - Read and write access to user contacts
Profile Permissions (required for authentication)
User.Read - Sign in and read user profile
offline_access - Maintain access to data (refresh tokens)
IMPORTANT: Before proceeding with setup, confirm that you understand and approve these permissions. Each permission grants specific access to your Microsoft 365 data.
See Permissions Reference for detailed information about what each permission allows.
Configuration
Multi-Account Configuration (v2.0.0+)
Accounts are stored in ~/.openclaw/auth/office365-accounts.json with tokens in ~/.openclaw/auth/office365/.
Use the accounts.js CLI to manage:
node accounts.js list # List all accounts
node accounts.js add <name> ... # Add account
node accounts.js remove <name> # Remove account
node accounts.js default <name> # Set default
Legacy Single-Account (Backward Compatible)
Environment variables still work for single-account use:
This skill uses OAuth 2.0 Device Code Flow for resilient authentication:
Request device code from Microsoft
Display user code and verification URL
User visits URL and enters code
Poll for token completion
Store access + refresh tokens (per-account)
Automatically refresh tokens when expired
Token storage: Tokens are securely stored in ~/.openclaw/auth/office365/<account-name>.json with mode 0600 (owner read/write only).
Usage Examples
Multi-Account Email Operations
# Read from default account
node email.js recent 10
# Read from specific account
node email.js recent 10 --account=work
# Search in consulting account
node email.js search "proposal" --account=consulting
# Send from appropriate identity
node send-email.js send client@example.com "Update""..." --account=consulting
Multi-Account Calendar Operations
# Check work calendar
node calendar.js today --account=work
# Check personal calendar
node calendar.js week --account=personal
Account Management
# List all configured accounts
node accounts.js list
# Check authentication status
node auth.js status --account=work
# Re-authenticate if needed
node auth.js login --account=work
Real-World Use Cases
Multiple Work Identities
Perfect when working across multiple organizations:
Thank you to Matthew Gordon for contributing the multi-account enhancement that makes this skill significantly more useful for consultants, freelancers, and anyone managing multiple work identities!