Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeltaWithTokenRequestBuilder: Creates invalid api request #2734

Open
phelm1-landolakes opened this issue Nov 7, 2024 · 1 comment
Open
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience

Comments

@phelm1-landolakes
Copy link

phelm1-landolakes commented Nov 7, 2024

Describe the bug

This url works:

https://graph.microsoft.com/v1.0/sites/landolakes.sharepoint.com/siteId/lists/listId/items/delta()?token=changeTokenFromPreviousDeltRequest

This url returns a 404 error

https://graph.microsoft.com/v1.0/sites/landolakes.sharepoint.com/siteId/lists/listId/items/delta(token='changeTokenFromPreviousDeltRequest')

Using the DeltaWithTokenRequestBuilder creates the second, incorrect url. And no other fluent way to set the token as a query parameter.

Expected behavior

The request created by the `DeltaWithTokenRequestBuilder' should work with the graph api. And/Or provide a Fluent way to properly set the token parameter.

How to reproduce

See above.

SDK Version

5.61.0

Latest version known to work for scenario above?

No response

Known Workarounds

        var ri = graphServiceClient.Sites[siteId].Lists[ListId].Items.Delta.ToGetRequestInformation();

        if (!string.IsNullOrWhiteSpace(currentDeltaToken))
        {
            ri.QueryParameters.Add("token", currentDeltaToken);
            ri.UrlTemplate = "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/delta()?token={token}{%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}";
        }

        var response = await graphServiceClient.RequestAdapter.SendAsync<Microsoft.Graph.Sites.Item.Lists.Item.Items.Delta.DeltaGetResponse>(ri, Microsoft.Graph.Sites.Item.Lists.Item.Items.Delta.DeltaGetResponse.CreateFromDiscriminatorValue, cancellationToken: cancellationToken);

This is crunchy, but it works.

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@phelm1-landolakes phelm1-landolakes added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 7, 2024
@andrueastman
Copy link
Member

Depends on the resolution of microsoftgraph/msgraph-metadata#431

@andrueastman andrueastman added dependency:metadata Awaiting fix from core dependency project module and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants