Microsoft Graph: "UnknownError" 504 While Polling Calendar Changes

Grace Wannapongsai
Grace Wannapongsai
  • Updated

Overview

This error occurs when Riva reaches Microsoft Graph and attempts to retrieve new, changed, or deleted calendar events, but the request times out before the underlying Exchange Online calendar service returns a response.

Issue

Riva returns an error similar to the following:

[ServiceError] GraphCalendarDataProvider.PollChangesEvents: Error trying to retrieve Calendar events ... ErrorCode: UnknownError, StatusCode: 504, Message:

The message may be blank because Microsoft Graph returned the generic OData error code UnknownError without a more detailed backend message. The HTTP 504 status is the most useful diagnostic detail.

Cause

  • A temporary Microsoft Graph or Exchange Online service delay.
  • A large or complex calendar change set.
  • A recurring series with many exceptions or corrupt or problematic items.
  • A slow calendar delta request or stale synchronization token.
  • A mailbox-specific Exchange Online backend issue.

Resolution

  1. For an isolated occurrence, allow the next Riva sync cycle to retry the request.
  2. Determine whether the error repeats for the same mailbox or affects many users at the same time.
  3. Review the Riva logs for the mailbox, timestamp, Graph request ID, client request ID, and request endpoint.
  4. If the error persists for one mailbox, review that calendar for unusually large recurring series or exceptions. Where applicable, follow the approved Riva procedure for rebuilding the user's calendar synchronization state.
  5. Escalate repeated 504 responses to Microsoft, especially when the request ID and timestamp can be supplied.