Skip to content

Commit

Permalink
Merge pull request #2186 from microsoftgraph/andrueastman-patch-1
Browse files Browse the repository at this point in the history
Update README.md to capture missing drive path
  • Loading branch information
andrueastman authored Oct 31, 2023
2 parents 8a414b0 + 6143a9d commit bc193d4
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 bc193d4

Please sign in to comment.