Skip to content

Microsoft 365

This guide covers how to connect Microsoft 365 to Mainbranch, enabling search across OneDrive, Outlook, and Calendar.

The Microsoft 365 connector provides access to:

  • OneDrive/SharePoint — Documents and files
  • Outlook Mail — Emails and attachments
  • Outlook Calendar — Events and meeting details

Before connecting Microsoft 365:

  • Admin access to Mainbranch
  • Microsoft 365 admin or Azure admin access
  • Understanding of Azure app registration (may require IT assistance)

Connecting Microsoft 365 requires registering an app in Azure.

  1. Access Azure Portal

    Sign in to the Azure Portal with admin credentials.

  2. Navigate to App Registrations

    Go to Azure Active Directory > App registrations.

  3. Create New Registration

    Click New registration and provide:

    • Application name (e.g., “Mainbranch Integration”)
    • Supported account types
    • Redirect URI (provided by Mainbranch)
  4. Configure Permissions

    Add the required API permissions for Microsoft Graph:

    • Files.Read.All (OneDrive)
    • Mail.Read (Outlook)
    • Calendars.Read (Calendar)
  5. Grant Admin Consent

    Grant admin consent for the permissions.

  6. Create Client Secret

    Generate a client secret and note it securely.

  7. Note Credentials

    Record the Application (client) ID and Directory (tenant) ID.

  1. Navigate to Apps

    Go to Workspace settings > Setup > Apps.

  2. Select Microsoft 365

    Find the Microsoft 365 connectors.

  3. Enter Credentials

    Provide:

    • Client ID from Azure
    • Client Secret
    • Tenant ID
  4. Authorize

    Complete the authorization flow.

  5. Start Sync

    Begin the initial synchronization.

  • Word documents
  • Excel spreadsheets
  • PowerPoint presentations
  • PDFs
  • Other supported file types
  • Emails in mailboxes
  • Email attachments
  • Email metadata
  • Calendar events
  • Event details and descriptions
  • Attendee information
  • Mainbranch respects Microsoft 365 sharing settings
  • Users only see content they have access to
  • SharePoint permissions are maintained

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

The first sync may take several hours depending on:

  • Volume of data
  • Number of users
  • Size of mailboxes
  • New content syncs automatically
  • Changes are reflected within minutes
  • Deleted content is removed from the index

Configure what to sync:

  • All users
  • Specific groups
  • Specific users

Select which services to connect:

  • OneDrive only
  • Outlook Mail only
  • Calendar only
  • All services
  • Verify Azure app registration is correct
  • Check client ID and secret
  • Verify tenant ID
  • Ensure permissions are granted
  • Check that admin consent was granted
  • Verify redirect URIs match
  • Review Azure app configuration
  • Verify content exists in Microsoft 365
  • Check user permissions
  • Allow time for sync to complete
  • Ensure file types are supported
  • Review error messages
  • Check Azure app status
  • Verify network connectivity
  • Client secrets should be rotated periodically
  • Store credentials securely
  • Use minimal required permissions
  • Only read access is requested
  • No modification of Microsoft 365 data
  • Access can be revoked by removing the Azure app
  • Follows Microsoft Graph API policies
  • Complies with your organization’s data policies
  • Audit logs available
  • Coordinate with IT for Azure configuration
  • Document the app registration
  • Plan for secret rotation
  • Check connector status regularly
  • Review sync metrics
  • Address errors promptly
  • Rotate client secrets periodically
  • Review permissions as needed
  • Monitor Azure app activity