504 Unknown Error while calling the GraphApi

GroovyJustin 0 Reputation points
2025-05-08T17:15:06.4066667+00:00

I'm getting a 504 UnknownError while calling the GraphApi to the resource 'me/calendarView/delta. This is occurring on multiple users and the error remains the same if I make the request later. There isn't much information on the error other than it is an UnknownError and the response code is 504.

{

resource = 'me/calendarView/delta'

events = Microsoft::DeltaStream.new(
    client:    client,
    resource:  resource
  ).stream(query: query)


e = nil
begin
  events.first
rescue Microsoft::GraphClient::ApiError => error
  e = error
end

e.type # UnknownError
e.response_code # 504


# e.error returns
{
 {
     :code => "UnknownError",
   :message => "",
:innerError => {
                   :date => "2025-05-08T16:14:12",
           :"request-id" => "227c2ef8-c067-49c8-81b0-86e856d58292",
    :"client-request-id" => "a9bb86ad-804d-4aed-b9fe-99791dd15f4e"
 }
}

# e.headers returns
{
        "transfer-encoding" => "chunked",
             "content-type" => "application/json",
                     "vary" => "Accept-Encoding",
"strict-transport-security" => "max-age=31536000",
               "request-id" => "227c2ef8-c067-49c8-81b0-86e856d58292",
        "client-request-id" => "a9bb86ad-804d-4aed-b9fe-99791dd15f4e",
      "x-ms-ags-diagnostic" => "{\"ServerInfo\":{\"DataCenter\":\"East US\",\"Slice\":\"E\",\"Ring\":\"5\",\"ScaleUnit\":\"001\",\"RoleInstance\":\"MN1PEPF0000F516\"}}",
                     "date" => "Thu, 08 May 2025 16:14:12 GMT",
               "connection" => "close"

```I couldn't find any other information but this error persists even after attempting the request later.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,590 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.