Skip to content

Different responses in SDK v4 vs SDK v5 for delta API call - "resyncRequired" in first app and "GatewayTimeout / UnknownError" in second app #3037

@Nikola-Jovanovski

Description

@Nikola-Jovanovski

Describe the bug

When calling the Microsoft Graph delta API:
GET https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/delta(token={tokenId})
I receive two different responses depending on the application and SDK version used.

The first app uses very simple setup (works as expected):

  • Microsoft Graph SDK v4.54
  • No custom handlers
  • Only Authentication Provider
  • Default configuration

Result:
Exception Code: resyncRequired
Message: Resync required. Replace any local items with the server's version (including deletes) if you're sure that the service was up to date with your local changes when you last sync'd. Upload any local changes that the server doesn't know about.

The second app uses:

  • Microsoft Graph SDK v5.42
  • Custom HTTP pipeline with DelegatingHandlers (e.g. ExceptionHandler, ServiceRetryHandler, AuthenticationHandler, etc.)

and I am crating the graph client using the following code:

httpClient = GraphClientFactory.Create(handlers: delegatingHandlers);
httpClient.Timeout = TimeSpan.FromMinutes(20);
_graphClient = new GraphServiceClient(httpClient);

Result:
Status Code: GatewayTimeout
"code":"UnknownError"
"message":""

Expected behavior

The second app should return same server error as first app - resyncRequired

How to reproduce

var httpClient = GraphClientFactory.Create(handlers: delegatingHandlers);
httpClient.Timeout = TimeSpan.FromMinutes(20);
_graphClient = new GraphServiceClient(httpClient);

Calling
https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/delta(token={tokenId})

SDK Version

5.42

Latest version known to work for scenario above?

4.54

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions