Issue with Folder Search Query in OneDrive using Microsoft Graph SDK

Kolb, Jannik 25 Reputation points
2024-12-12T17:58:10.24+00:00

Hello,

I am using the following query to search for a specific folder in OneDrive:

folderSearch = await GraphClient.Drives[driveId]
                                        .Items
                                        .GetAsync(requestConfig => requestConfig.QueryParameters.Filter = $"Name eq '{folderName}'");


This code was working perfectly, but it recently stopped functioning—likely within the past few days. I only noticed the issue today.

Does anyone have any insights into what might be causing this issue?

Here are the versions of the libraries I’m using:

  • Microsoft.Graph: 5.66.0
  • Azure.Identity: 1.13.1

Thank you in advance for your help!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,869 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 44,851 Reputation points
    2024-12-19T09:56:08.3733333+00:00

    Hi @Kolb, Jannik

    This may be an issue with the API, I just confirmed this with my colleague. Since last week, the $filter query parameter for drive items doesn't seem to work.

    I suggest you submit a support ticket with the Microsoft Support team to confirm if there are any changes to the API.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. CarlZhao-MSFT 44,851 Reputation points
    2024-12-13T03:02:41.2933333+00:00

    Hi @Kolb, Jannik

    Does it throw any errors? It works fine for me.

    User's image


Your answer

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