The same question has already been solved in SO: https://stackoverflow.com/questions/71501644/why-am-i-getting-a-notsupportedexception-when-i-call-the-graph-api
Graph API SDK: System.NotSupportedException
Nelson Nyland
26
Reputation points
I'm getting a System.NotSupportedException when I run a query such as:
DriveItem item = await _graphApiClient.Sites[SiteId].Drives[DriveId].Root.ItemWithPath(path).Request().GetAsync();
Microsoft Security | Microsoft Graph
Microsoft Security | Microsoft Graph
An API that connects multiple Microsoft services, enabling data access and automation across platforms
Answer accepted by question author
1 additional answer
Sort by: Most helpful
-
CarlZhao-MSFT 46,411 Reputation points2022-03-16T03:22:02.727+00:00 I tested your code locally and it worked for me:
DriveItem item = await graphClient.Sites["site id"].Drives["drive id"].Root.ItemWithPath("item path") .Request() .GetAsync();
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.