microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

UsedRangeRequestBuilder.GetAsync uses DefaultQueryParameters

Open
#2,696 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm trying to specify the "Select" QueryParameters in the GetAsync, but since it is using the DefaultQueryParamters, I can not use it.

In the Graph Explorer, I used the following query:
https://graph.microsoft.com/v1.0/me/drive/items/{drive-item-id}/workbook/worksheets('Sheet1')/usedrange?$select=address

In the Code snippets, it generates the following code:

var result = await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Workbook.Worksheets["{workbookWorksheet-id}"].UsedRange.GetAsync((requestConfiguration) =>
{
	requestConfiguration.QueryParameters.Select = new string []{ "address" };
});

But this is not available in the SDK.

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 with UsedRangeRequestBuilder.GetAsync and compare its request configuration with the generated C# snippet for the Graph Explorer $select=address query. Trace how DefaultQueryParameters are applied and verify that Select can be specified; done means the SDK accepts the shown configuration and emits the expected query parameter.

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.