Unable to get a Special Folder by name using the GraphServiceClient. #2624
Labels
status:waiting-for-author-feedback
Issue that we've responded but needs author feedback to close
type:question
An issue that's a question
Problem:
According to the docs, the request for a special folder should be
GET /me/drive/special/{name}
, however, there is no way to construct this path using the Graph SDK.What I tried:
This does not work, because
DriveRequestBuilder
does not contain a definition forSpecial
.This will not work, because the slash will become url encoded.
The C# example in the docs say to do this.
But there is no
drive-id
to specify. Attempting to use null or empty string as the drive id created an invalid request url.BaseGraphServiceClient
does not contain aDriveRequestBuilder
so we can't do something like this.Potential Workaround:
The only way I have found to get the drive is by specifying the entire url, but clearly this is not ideal.
Side Question: Is there a way to get the baseUrl from an instance of GraphServiceClient? Or any way to build a url with a relative path?
Suggestion:
Add
SpecialRequestBuilder
toDriveRequestBuilder
or add handling for null drive-id inDrivesRequestBuilder
.The docs should also be updated, as the current C# example doesn't work. (You shouldn't need a drive-id, but the docs say to specify one).
The text was updated successfully, but these errors were encountered: