msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

'DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters' does not contain a definition for 'Token'

Open kesane-msft opened this issue 10 months ago • 5 comments

Describe the bug

I am trying to query changed SharePoint sites via the Microsoft.Graph 5.70 SDK, using the delta tokens. I was trying using the code snippets listed here - https://learn.microsoft.com/en-us/graph/api/site-delta?view=graph-rest-1.0&tabs=csharp#request-1

However, the compiler is giving the following error - 'DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters' does not contain a definition for 'Token' and no accessible extension method 'Token' accepting a first argument of type 'DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters' could be found (are you missing a using directive or an assembly reference?)

Expected behavior

The code should compile and delta query should go through successfully.

How to reproduce

Visual Studio, C#, Microsoft.Graph nuget v5.70. Code snippet from here - https://learn.microsoft.com/en-us/graph/api/site-delta?view=graph-rest-1.0&tabs=csharp#request-1

SDK Version

5.70

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

- OS: Windows
- Architecture: x64

### Other information

_No response_

kesane-msft avatar Feb 24 '25 23:02 kesane-msft

Does the v1.0/sites/delta endpoint work for you? Even if I'm SharePoint Administrator and granted permissions like Sites.Read.All, Sites.Manage.All and Sites.FullControl.All, the response is still 403.

MartinM85 avatar Feb 25 '25 06:02 MartinM85

Interesting. Through graph explorer, I am hitting 403 as you mentioned. I am pretty sure it was working last Friday.

kesane-msft avatar Feb 25 '25 06:02 kesane-msft

Interesting. Through graph explorer, I am hitting 403 as you mentioned. I am pretty sure it was working last Friday.

I'm also sure it worked recently 🙂

MartinM85 avatar Feb 25 '25 07:02 MartinM85

@kesane-msft As a workaround, you can use the WithUrl method

var response = await client.Sites.Delta.WithUrl($"https://graph.microsoft.com/v1.0/sites/delta?token={token}").GetAsDeltaGetResponseAsync();

MartinM85 avatar Feb 25 '25 13:02 MartinM85

@MartinM85 - thanks for the suggestion, that worked and unblocked me for now.

kesane-msft avatar Feb 26 '25 06:02 kesane-msft