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

RootRequestBuilder.ItemWithPath() can't set query parameter #1806

Closed
mkckr0 opened this issue Apr 5, 2023 · 2 comments · Fixed by #1906
Closed

RootRequestBuilder.ItemWithPath() can't set query parameter #1806

mkckr0 opened this issue Apr 5, 2023 · 2 comments · Fixed by #1906
Labels

Comments

@mkckr0
Copy link

mkckr0 commented Apr 5, 2023

Describe the bug
RootRequestBuilder.ItemWithPath() can't set query parameter

To Reproduce
Steps to reproduce the behavior:

var root = graphClient.Drives[userDriveId].Root;
var info = root.ItemWithPath("/abc").ToGetRequestInformation(config =>
{
    config.QueryParameters.Expand = new string[] { "children" };
});
Console.WriteLine(info.URI);

Expected behavior
print a url include expand=children

Screenshots
it only print

https://graph.microsoft.com/v1.0/drives/xxxxxxxxxxxxx/root:/abc:

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 5.4.0

Additional context
Graph Explorer can accept this kind of url

https://graph.microsoft.com/v1.0/me/drive/root://Business Data:/?expand=children
@ghost ghost added the Needs: Triage label Apr 5, 2023
@tigertop
Copy link

tigertop commented Apr 23, 2023

Hi
I also encountered the same error.
In my case the solution was to use appropriate extension

var root = graphClient.Drives[userDriveId].Root;
var info = root.ItemWithPath("/abc").Children.ToGetRequestInformation();
Console.WriteLine(info.URI);

@mkckr0
Copy link
Author

mkckr0 commented May 1, 2023

Hi I also encountered the same error. In my case the solution was to use appropriate extension

var root = graphClient.Drives[userDriveId].Root;
var info = root.ItemWithPath("/abc").Children.ToGetRequestInformation();
Console.WriteLine(info.URI);

I know it, but I want to get it using only one request rather than dividing into two.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants