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.
10,824 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,829 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 315 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