microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
[Client bug]: DeltaWithToken and DateTime format
Nobody has claimed this yet.
- 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:
- Execute a Delta query using DriveItemItemRequestBuilder.DeltaWithToken method.
- Include a token with DateTime format such as: '2021-09-29T20:00:00Z'
- See error "token malformed"
Expected behavior
Delta query should success.
Screenshots
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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