Graph API SDK: System.NotSupportedException

Nelson Nyland 26 Reputation points
2022-03-15T20:54:16.923+00:00

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
{count} votes

Answer accepted by question author
  1. CarlZhao-MSFT 46,411 Reputation points
    2022-03-25T08:25:13.043+00:00
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,411 Reputation points
    2022-03-16T03:22:02.727+00:00

    Hi @Nelson Nyland

    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();  
    

    183517-image.png


    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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.