Skip to content

Commit

Permalink
Update README.md to capture missing drive path
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman authored Oct 31, 2023
1 parent 8a414b0 commit 6143a9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6143a9d

Please sign in to comment.