Microsoft 365 Apps Integration
Connect Chatty AI with Microsoft 365 services including Outlook, OneDrive, Teams, SharePoint, and more.
Overview
Microsoft 365 integration allows Chatty AI to access and interact with your Microsoft 365 data and services.
Supported Services:
- 📧 Outlook - Email management
- 📁 OneDrive - File storage and sharing
- 👥 Teams - Team collaboration
- 📊 SharePoint - Document management
- 📅 Calendar - Schedule management
- ✅ To Do - Task management
- 📋 Planner - Project planning
- 📝 OneNote - Note taking
- 📈 Excel - Spreadsheet access
Configuration
Option 1: Using Chatty AI Multitenant App (Recommended)
For all deployments using Chatty AI MCP servers:
Chatty AI provides a pre-configured multitenant Azure App Registration:
- ✅ No Azure setup required - Use Chatty AI's multitenant app
- ✅ Pre-configured permissions - All MS365 services enabled
- ✅ Vendor-managed - Credentials handled securely
- ✅ Works with Chatty AI MCP servers - Seamless integration
Requirements:
- Must use Chatty AI MCP servers for MS365 integration
- MCP server URLs provided by vendor
MCP Server URLs:
# MS365 MCP Server (Chatty AI Hosted)
MS365_MCP_SERVER_URL=https://mcp-ms365.chattyai.io
# Or internal deployment
MS365_MCP_SERVER_URL=http://mcp-ms365:3100
Configuration:
# In .env file
CHATTY_APP_SHOW_APPS=true
CHATTY_APP_AUTO_CONNECT_ON_STARTUP=false
# MCP Server for MS365
MS365_MCP_SERVER_URL=https://mcp-ms365.chattyai.io
For Portainer Deployments:
- Credentials are pre-configured by vendor
- MCP server URL is pre-configured
- No customer action required
For Docker Compose Deployments:
- Contact vendor for MCP server URL
- Add MCP server URL to
.env - Restart services
Option 2: Custom Azure App Registration
Only required if NOT using Chatty AI MCP servers:
If you want to use your own infrastructure without Chatty AI MCP servers, you must create your own Azure App Registration:
Step 1: Create Azure App Registration
- Go to Azure Portal
- Navigate to Azure Active Directory → App registrations
- Click New registration
- Configure:
- Name:
Chatty AI MS365 Integration - Supported account types: Multitenant
- Redirect URI:
https://YOUR_CHATTYAI_DOMAIN/oauth/microsoft/callback
- Name:
- Click Register
Step 2: Configure API Permissions
- Go to API permissions
- Click Add a permission → Microsoft Graph
- Select Delegated permissions
- Add these required permissions:
User & Profile (Required):
User.Read- Read signed-in user's profileUser.ReadBasic.All- Read basic profiles of all users
Email (Outlook):
Mail.Read- Read user's emailMail.ReadWrite- Read and write user's emailMail.Send- Send email as userMailboxSettings.Read- Read user's mailbox settings
Files (OneDrive):
Files.Read- Read user's filesFiles.Read.All- Read all files user can accessFiles.ReadWrite- Read and write user's filesFiles.ReadWrite.All- Read and write all files user can access
Calendar:
Calendars.Read- Read user's calendarsCalendars.ReadWrite- Read and write user's calendars
Tasks (To Do):
Tasks.Read- Read user's tasksTasks.ReadWrite- Create, read, update and delete user's tasks
Notes (OneNote):
Notes.Read- Read user's notebooksNotes.Read.All- Read all notebooks user can accessNotes.ReadWrite- Read and write user's notebooks
SharePoint & Teams:
Sites.Read.All- Read items in all site collectionsSites.ReadWrite.All- Read and write items in all site collectionsTeam.ReadBasic.All- Read names and descriptions of teamsChannel.ReadBasic.All- Read channel names and descriptions
Excel:
Files.Read- Read Excel files (covered above)Files.ReadWrite- Read and write Excel files (covered above)
Planner:
Tasks.Read- Read user's planner tasksTasks.ReadWrite- Create, read, update and delete user's planner tasksGroup.Read.All- Read all groups (for planner)
- Click Grant admin consent for [Your Organization]
- Confirm admin consent
Permission Scope Summary
| Service | Minimum Permissions | Recommended Permissions |
|---|---|---|
| Outlook | Mail.Read, Mail.Send | Mail.ReadWrite, MailboxSettings.Read |
| OneDrive | Files.Read | Files.ReadWrite.All |
| Calendar | Calendars.Read | Calendars.ReadWrite |
| To Do | Tasks.Read | Tasks.ReadWrite |
| OneNote | Notes.Read | Notes.ReadWrite |
| SharePoint | Sites.Read.All | Sites.ReadWrite.All |
| Teams | Team.ReadBasic.All | Channel.ReadBasic.All |
| Planner | Tasks.Read, Group.Read.All | Tasks.ReadWrite |
Step 3: Create Client Secret
- Go to Certificates & secrets
- Click New client secret
- Set expiration (24 months recommended)
- Click Add
- Copy the secret value immediately
Step 4: Configure Environment Variables
Add to .env:
# Microsoft 365 OAuth Configuration
CHATTY_APP_MS365_OAUTH_CLIENT_ID=your-client-id-here
CHATTY_APP_MS365_OAUTH_CLIENT_SECRET=your-secret-here
CHATTY_APP_MS365_OAUTH_TENANT_ID=common
# Enable MS365 apps
CHATTY_APP_SHOW_APPS=true
CHATTY_APP_AUTO_CONNECT_ON_STARTUP=false
Step 5: Restart Services
docker compose restart chattyai
Using MS365 Apps
Connecting Your Account
- Login to Chatty AI
- Go to Settings → Apps
- Find Microsoft 365 app
- Click "Connect"
- Authorize with your Microsoft account
- Grant permissions when prompted
Example Interactions
Outlook
User: Show me my unread emails from today
Chatty AI: [Accesses Outlook]
You have 5 unread emails:
1. Meeting reminder from John
2. Project update from Sarah
...
User: Send an email to john@company.com about the meeting
Chatty AI: [Composes and sends email via Outlook]
Email sent to john@company.com
OneDrive
User: Find the Q4 report in my OneDrive
Chatty AI: [Searches OneDrive]
Found: Q4_Financial_Report.xlsx
Location: /Documents/Reports/
Modified: 2 days ago
User: Share the Q4 report with sarah@company.com
Chatty AI: [Shares file via OneDrive]
File shared with sarah@company.com
Calendar
User: What meetings do I have tomorrow?
Chatty AI: [Checks Calendar]
Tomorrow's meetings:
- 9:00 AM: Team standup
- 2:00 PM: Client call
- 4:00 PM: Project review
User: Schedule a meeting with John for next Monday at 10 AM
Chatty AI: [Creates calendar event]
Meeting scheduled for Monday, April 15 at 10:00 AM
Security & Privacy
Data Access
- User-specific: Each user authorizes their own account
- Scoped permissions: Only requested permissions granted
- Revocable: Users can revoke access anytime
Revoking Access
In Chatty AI:
- Settings → Apps
- Find Microsoft 365
- Click "Disconnect"
In Microsoft Account:
- Go to Microsoft Account
- Security → App permissions
- Find "Chatty AI"
- Click "Remove"
Token Storage
- OAuth tokens stored encrypted
- Tokens refreshed automatically
- Tokens expire after inactivity
Troubleshooting
Cannot Connect MS365 Account
# Check environment variables
docker compose exec chattyai env | grep CHATTY_APP_MS365
# Verify redirect URI matches Azure
grep CHATTYAI_URL .env
# Check logs
docker compose logs chattyai | grep -i oauth
Permission Denied Errors
# Verify permissions granted in Azure
# Azure Portal → App Registration → API permissions
# Check admin consent granted
# May require tenant admin approval
# Reconnect account
# Settings → Apps → Disconnect → Connect again
Token Expired
# Tokens refresh automatically
# If issues persist, reconnect account
# Settings → Apps → Microsoft 365 → Disconnect → Connect
Environment Variables Reference
See Core Application Variables for complete details:
CHATTY_APP_SHOW_APPS- Show/hide MS365 appsCHATTY_APP_AUTO_CONNECT_ON_STARTUP- Auto-connect on startupCHATTY_APP_MS365_OAUTH_CLIENT_ID- Azure client IDCHATTY_APP_MS365_OAUTH_CLIENT_SECRET- Azure client secretCHATTY_APP_MS365_OAUTH_TENANT_ID- Azure tenant ID
Related Documentation
- Integrations Overview - All integrations
- Core Application Variables - MS365 configuration
- SSO Configuration - Microsoft SSO for login
- Jira Integration - Jira project management