Share via

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

Sameh Tawfik (MiddleEast) 5 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 Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 3,640 Reputation points Microsoft External Staff
    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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.