Skip to main content

Troubleshoot the Outlook connector

Beta

This feature is in Beta.

This page describes common issues with the Outlook connector in Databricks Lakeflow Connect and how to resolve them.

For general troubleshooting guidance that applies to all managed ingestion pipelines, see Troubleshoot managed ingestion pipelines.

Authenticated but Outlook data is not visible​

Issue: Authentication succeeded, but no Outlook data appears in the destination table.

Resolution:

  • Confirm that the app registration has the required Microsoft Graph API application permissions (User.Read.All or Directory.Read.All, and Mail.Read) and that admin consent has been granted.
  • Confirm that the mailboxes specified in include_mailboxes (if provided) correspond to active Exchange Online mailboxes.
  • Confirm that the connection was created with the correct Client ID, Client secret, and Tenant ID. Edit the connection in Catalog Explorer to verify.

Insufficient privileges error​

Issue: The pipeline fails with an insufficient privileges error.

Resolution:

  • Confirm that the app registration has the correct Microsoft Graph API application permissions, not delegated permissions.
  • Confirm that an administrator has clicked Grant admin consent for the required permissions in the Azure portal.
  • If the error reports HTTP status 403 for the attachments API, confirm that the app registration has the Mail.Read application permission and admin consent, and that no Application Access Policy excludes the mailbox.

MailboxNotEnabledForRESTAPI error​

Issue: The connector reports a MailboxNotEnabledForRESTAPI error for one or more mailboxes.

Resolution:

  • This error indicates that the mailbox is not enabled for the Microsoft Graph REST API. This typically occurs for on-premises mailboxes or mailboxes that have not been migrated to Exchange Online. The connector automatically skips these mailboxes with a warning and continues ingestion for the remaining mailboxes.

Token expired or invalid client secret error​

Issue: The pipeline fails with a token expired or invalid client secret error.

Resolution:

  • Client secrets in Microsoft Entra ID have an expiration date. If the secret has expired:
    1. Create a client secret in the app registration under Certificates & secrets.
    2. Update the connection in Databricks with the new client secret value.

The connector automatically attempts to refresh the OAuth token when it receives an HTTP 401 response from the Microsoft Graph API.

Specified folders are not being ingested​

Issue: Emails from a folder specified in include_folders are not appearing in the destination table.

Resolution:

  • Folder matching is case-insensitive, but the folder name must exactly match the display name as it appears in Outlook. Verify the display name in the target mailbox.
  • To sync a nested subfolder, specify its full path from the mailbox root using / as the separator, for example Inbox/Projects/2026. Each segment must match a folder display name at that level of the hierarchy. If a folder name itself contains a /, escape it as \/.
  • If a specified folder or any segment of a nested path doesn't exist in a mailbox, the connector skips that entry and the update still succeeds. This also happens after a folder is renamed, moved, or deleted in Outlook, because entries are matched by path at the start of each update. For a renamed or moved folder, update include_folders to the folder's current path.
  • If no entry matches in any mailbox, the update succeeds without ingesting any email. Check each entry against the folder paths in the mailboxes.

Older email is missing after changing filters or start_date​

Issue: After you change a filter option or start_date on an existing pipeline, older email that matches the new settings doesn't appear in the destination table.

Resolution:

Duplicate rows for emails moved between folders​

Issue: The email_messages table contains more than one row for the same email, with different outlook_message_id and folder values.

Cause: The Microsoft Graph API assigns an email a new message ID when it moves to another folder. The connector doesn't track moves, so the row ingested from the original folder remains. If the email was received after the new folder's saved sync progress, the connector ingests it again from its new folder under the new ID.

Resolution:

To rebuild the table from the current contents of the mailboxes, run a full refresh of the table. After a full refresh, each email appears one time, in the folder it is in at that point. See Fully refresh target tables.

warning

A full refresh re-ingests only the emails that are in the mailboxes at the time of the refresh and that match all of the pipeline's current outlook_options, such as the included mailboxes, folders, senders, subjects, and start_date. Rows for emails that were deleted, or that no longer match those options, are removed from the table. To keep those rows, copy the table before the full refresh.

A mailbox in include_mailboxes isn't being ingested​

Issue: The pipeline update succeeds, but no email from one of the mailboxes listed in include_mailboxes appears in the destination table.

Resolution:

  • The connector skips a listed mailbox that it can't read and continues with the other mailboxes. Confirm that the address is the user principal name (UPN) of an active Exchange Online mailbox.
  • If your organization uses an Application Access Policy or role-based access control (RBAC) for Applications in Exchange Online to limit which mailboxes the app registration can read, confirm that the policy includes the mailbox.

OUTLOOK_MAILBOX_RESOLUTION_FAILED error​

Issue: The pipeline update fails with OUTLOOK_MAILBOX_RESOLUTION_FAILED.

Resolution:

  • None of the mailboxes listed in include_mailboxes could be read, and at least one of them failed for a reason other than having no Exchange Online mailbox, such as throttling, a server error, or an authorization error. A throttling or server error is usually temporary. Run the update again.
  • If the error repeats on every update, check the HTTP statuses in the error and the app registration's access to those mailboxes. Confirm that the client secret is valid and that admin consent is granted for its permissions. See Token expired or invalid client secret error.
  • If it still repeats, create a support ticket.

Update fails while fetching attachments​

Issue: The pipeline update fails with a source API error that reports UNEXPECTED_HTTP_STATUS(status=404) for the attachments API.

Resolution:

  • This error occurs when an email is deleted or moved after the connector lists it but before the connector fetches its attachments. Run the update again. The next update lists the folder again, and the deleted or moved email is no longer in it.
  • If the same error repeats on every update, create a support ticket.

Rows remain for email that was deleted​

Issue: The destination table contains rows for email that was deleted, purged, or recalled in the mailbox, or for a mailbox or folder that you removed from the pipeline.

Resolution:

Need more help?​

If you encounter an issue that is not covered in this troubleshooting guide, create a support ticket.