Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Creating a folder does not properly handle the select query option #336

Copy link
Copy link
@BillCollabAuth

Description

@BillCollabAuth
Issue body actions

Expected behavior

Specifying a select query option when creating a folder will successfully return the select properties as part of the response.

Actual behavior

An exception is thrown with a 400 "Bad Request" response code. Looking at a more detailed message shows the following:

Query option '$select' was specified more than once, but it must be specified at most once.

It looks like the Java SDK duplicates the select query options upon building the request. This can be seen when looking at the request URL sent:

https://graph.microsoft.com/v1.0/drives/randomDriveId/items/root/children?$select=id&$select=id

Steps to reproduce the behavior

DriveItemWithInstanceAttributes folderToCreate = DriveItemWithInstanceAttributes.builder()
            .withName(folderName)
            .withFolder(new Folder())
            .withConflictBehavior("fail")
            .build();
DriveItem createdFolder = graphClient.drives(driveId).items(parentItemId).children().buildRequest().select("id").post(folderToCreate)

This successfully runs if select options are excluded from request.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.