Overview
Microsoft 365 integration provides access to Outlook, Calendar, OneDrive, Teams, and other Microsoft services through Microsoft Graph API.Supported Services
- Outlook Email - Send, read, and manage emails
- Calendar - Schedule events and manage availability
- OneDrive - Access and manage files
- Teams - Channel and chat integration
- Contacts - Access and manage contacts
- To Do - Task management
Setup
1. Register Application in Azure
- Go to Azure Portal
- Navigate to “Azure Active Directory” > “App registrations”
- Click “New registration”
- Enter application details:
- Name: “Praxos”
- Supported account types: Choose based on needs
- Redirect URI:
https://your-domain.com/auth/microsoft/callback
2. Configure API Permissions
Add delegated permissions: MailMail.ReadMail.ReadWriteMail.Send
Calendars.ReadCalendars.ReadWrite
Files.Read.AllFiles.ReadWrite.All
Team.ReadBasic.AllChannel.ReadBasic.AllChatMessage.Send
3. Create Client Secret
- Go to “Certificates & secrets”
- Click “New client secret”
- Set expiration (recommended: 24 months)
- Copy the secret value immediately
4. Configure Praxos
Add to.env:
User Authorization
OAuth flow for user authorization:- User requests Microsoft integration
- Praxos provides authorization URL
- User signs in with Microsoft account
- Grants requested permissions
- Tokens stored securely
- Integration complete
Features
Outlook Email
Send EmailsCalendar
Schedule MeetingsOneDrive
File AccessTeams Integration
Send Channel MessagesConfiguration
Environment Variables
Graph API Settings
Advanced Features
Batch Requests
For efficiency, batch multiple requests:Delta Queries
Track changes efficiently:Webhooks
Real-time notifications for:- New emails
- Calendar changes
- File updates
Troubleshooting
Authentication Issues
Invalid Client- Verify Client ID and Secret
- Check Application ID in Azure Portal
- Ensure secret hasn’t expired
- Check required API permissions granted
- Admin consent may be required
- Verify user has necessary licenses
API Errors
403 Forbidden- User lacks permissions
- Application lacks API permissions
- Tenant admin hasn’t consented
- Rate limit exceeded
- Implement backoff strategy
- Review request patterns
- Microsoft service issues
- Retry with exponential backoff
- Check Microsoft Service Health
Rate Limits
Microsoft Graph throttling limits:| Resource | Limit |
|---|---|
| 10K requests/10 min | |
| Calendar | 10K requests/10 min |
| Files | 10K requests/10 min |
| Batch | 4 requests/second |
Praxos automatically handles throttling with retry logic and exponential backoff.
Security
Token Security
- Tokens encrypted at rest
- Automatic token refresh
- Secure credential storage
- Per-user isolation
Conditional Access
Support for:- Multi-factor authentication
- Conditional Access policies
- Device compliance requirements
Compliance
- GDPR compliant
- SOC 2 considerations
- Data residency options
- Audit logging
Best Practices
- Use batch requests when possible
- Implement delta queries for sync
- Cache frequently accessed data
- Monitor API usage and throttling
- Use webhooks for real-time updates