From 6143a9d3b920717ac093ae21f52dd5f671f73436 Mon Sep 17 00:00:00 2001 From: Eastman Date: Tue, 31 Oct 2023 10:03:29 +0300 Subject: [PATCH] Update README.md to capture missing drive path --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5324da41b15..1d63c745493 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,11 @@ var drive = await graphClient.Me.Drive.GetAsync(); To get the current user's root folder of their default drive: ```csharp -var rootItem = await graphClient.Me.Drive.Root.GetAsync(); +// Get the user's driveId +var drive = await graphClient.Me.Drive.GetAsync(); +var userDriveId = driveItem.Id; +// use the driveId to get the root drive +var rootItem = await graphClient.Drives[userDriveId].Root.GetAsync(); ``` `GetAsync` will return a `DriveItem` object on success and throw a