How to troubleshoot 'Bad Request' error when using 'startswith' to filter groups in Microsoft Graph API?

Sameh Tawfik (MiddleEast) 0 Reputation points
2024-05-10T18:40:00.9666667+00:00

I'm using the following endpoint to query the Microsoft Graph API, tracking changes by delta and filter groups by displayName using 'startswith':

https://graph.microsoft.com/v1.0/groups/delta?$select=id,displayName,members&$filter=startswith(displayName,'test-')

However, I'm receiving a '400 Client Error: Bad Request' for the URL. Can anyone recommend any troubleshooting steps or solutions?

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

1 answer

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 3,540 Reputation points Microsoft Vendor
    2024-05-10T21:35:32.5066667+00:00

    Hello @Sameh Tawfik (MiddleEast) ,

    According to the Microsoft documentation https://learn.microsoft.com/en-us/graph/delta-query-overview#optional-query-parameters, we can track changes to groups filtering only by object ID. We can't filter by using displayName. Please check below image.

    User's image

    Hope this helps. If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

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.