microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

[Client bug]: DeltaWithToken and DateTime format

Open
#2,277 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug: metadata OpenApi
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Describe the bug

DeltaWithTokenRequestBuilder.DeltaWithToken(string token) not working with DateTime values that contains time.

To Reproduce
Steps to reproduce the behavior:

  1. Execute a Delta query using DriveItemItemRequestBuilder.DeltaWithToken method.
  2. Include a token with DateTime format such as: '2021-09-29T20:00:00Z'
  3. See error "token malformed"

Expected behavior

Delta query should success.

Screenshots
image

Client version
v5.37.0 Microsoft.Graph

Additional context
Based on documentation format for datetimes should be '2021-09-29T20:00:00Z' but this raises above exception.
Scaping the datetime as url doesn't work either.

When removing the time from the datetime then it's working:

  • Fails:
    DeltaWithToken("2024-01-01T20:00:00Z")
  • Works:
    DeltaWithToken("2024-01-01")

Also seems to be a limitation of 2months -1day to set the DateTime value in the past. Maybe is documented elsewhere?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at DeltaWithTokenRequestBuilder.DeltaWithToken(string token) and reproduce the issue with the documented timestamp token, comparing it with the date-only case. Done means a Delta query accepts a token such as 2024-01-01T20:00:00Z without the “token malformed” error; no source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.