Microsoft 365
This guide covers how to connect Microsoft 365 to Mainbranch, enabling search across OneDrive, Outlook, and Calendar.
Overview
Section titled “Overview”The Microsoft 365 connector provides access to:
- OneDrive/SharePoint — Documents and files
- Outlook Mail — Emails and attachments
- Outlook Calendar — Events and meeting details
Prerequisites
Section titled “Prerequisites”Before connecting Microsoft 365:
- Admin access to Mainbranch
- Microsoft 365 admin or Azure admin access
- Understanding of Azure app registration (may require IT assistance)
Azure App Registration
Section titled “Azure App Registration”Connecting Microsoft 365 requires registering an app in Azure.
Creating the App Registration
Section titled “Creating the App Registration”-
Access Azure Portal
Sign in to the Azure Portal with admin credentials.
-
Navigate to App Registrations
Go to Azure Active Directory > App registrations.
-
Create New Registration
Click New registration and provide:
- Application name (e.g., “Mainbranch Integration”)
- Supported account types
- Redirect URI (provided by Mainbranch)
-
Configure Permissions
Add the required API permissions for Microsoft Graph:
- Files.Read.All (OneDrive)
- Mail.Read (Outlook)
- Calendars.Read (Calendar)
-
Grant Admin Consent
Grant admin consent for the permissions.
-
Create Client Secret
Generate a client secret and note it securely.
-
Note Credentials
Record the Application (client) ID and Directory (tenant) ID.
Connecting to Mainbranch
Section titled “Connecting to Mainbranch”-
Navigate to Apps
Go to Workspace settings > Setup > Apps.
-
Select Microsoft 365
Find the Microsoft 365 connectors.
-
Enter Credentials
Provide:
- Client ID from Azure
- Client Secret
- Tenant ID
-
Authorize
Complete the authorization flow.
-
Start Sync
Begin the initial synchronization.
What Gets Indexed
Section titled “What Gets Indexed”OneDrive and SharePoint
Section titled “OneDrive and SharePoint”- Word documents
- Excel spreadsheets
- PowerPoint presentations
- PDFs
- Other supported file types
Outlook Mail
Section titled “Outlook Mail”- Emails in mailboxes
- Email attachments
- Email metadata
Outlook Calendar
Section titled “Outlook Calendar”- Calendar events
- Event details and descriptions
- Attendee information
Access and Permissions
Section titled “Access and Permissions”How Permissions Work
Section titled “How Permissions Work”- Mainbranch respects Microsoft 365 sharing settings
- Users only see content they have access to
- SharePoint permissions are maintained
Permission Inheritance
Section titled “Permission Inheritance”Access in Mainbranch matches access in Microsoft 365:
- Personal OneDrive files are visible only to the owner
- Shared files follow sharing settings
- SharePoint sites follow site permissions
Sync Details
Section titled “Sync Details”Initial Sync
Section titled “Initial Sync”The first sync may take several hours depending on:
- Volume of data
- Number of users
- Size of mailboxes
Ongoing Sync
Section titled “Ongoing Sync”- New content syncs automatically
- Changes are reflected within minutes
- Deleted content is removed from the index
Configuration Options
Section titled “Configuration Options”Configure what to sync:
- All users
- Specific groups
- Specific users
Services
Section titled “Services”Select which services to connect:
- OneDrive only
- Outlook Mail only
- Calendar only
- All services
Troubleshooting
Section titled “Troubleshooting”Connection Failed
Section titled “Connection Failed”- Verify Azure app registration is correct
- Check client ID and secret
- Verify tenant ID
- Ensure permissions are granted
Authorization Errors
Section titled “Authorization Errors”- Check that admin consent was granted
- Verify redirect URIs match
- Review Azure app configuration
Missing Content
Section titled “Missing Content”- Verify content exists in Microsoft 365
- Check user permissions
- Allow time for sync to complete
- Ensure file types are supported
Sync Errors
Section titled “Sync Errors”- Review error messages
- Check Azure app status
- Verify network connectivity
Security Considerations
Section titled “Security Considerations”Credentials
Section titled “Credentials”- Client secrets should be rotated periodically
- Store credentials securely
- Use minimal required permissions
Data Access
Section titled “Data Access”- Only read access is requested
- No modification of Microsoft 365 data
- Access can be revoked by removing the Azure app
Compliance
Section titled “Compliance”- Follows Microsoft Graph API policies
- Complies with your organization’s data policies
- Audit logs available
Best Practices
Section titled “Best Practices”- Coordinate with IT for Azure configuration
- Document the app registration
- Plan for secret rotation
Monitoring
Section titled “Monitoring”- Check connector status regularly
- Review sync metrics
- Address errors promptly
Security
Section titled “Security”- Rotate client secrets periodically
- Review permissions as needed
- Monitor Azure app activity
Next Steps
Section titled “Next Steps”- Connect Google Workspace — If you also use Google
- Configure Security — Review security settings
- Return to Connectors Overview