Graph API complains about missing parameter which are provided

Søren Herskind Nielsen 0 Reputation points
2024-05-17T13:07:11.72+00:00

Hi - Im am trying to use the identityGovernance/privilegedAccess/group/eligibilitySchedules API as described here:
https://learn.microsoft.com/en-us/graph/api/privilegedaccessgroup-list-eligibilityschedules?view=graph-rest-1.0&tabs=csharp

I am using az rest like this:

az rest --method "get" `
        --url "https://graph.microsoft.com/beta/identityGovernance/privilegedAccess/group/eligibilitySchedules?filter=groupid%20eq%20%27$($groupId)%27"

where $groupId is a guid of a AD group.

This call works fine, but when try with version 1.0 instead of the beta version, like this:

az rest --method "get" `
        --url "https://graph.microsoft.com/v1.0/identityGovernance/privilegedAccess/group/eligibilitySchedules?$filter=groupid%20eq%20%27$($groupId)%27"

i get the error message:

ERROR: Bad Request({"error":{"code":"MissingParameters","message":"The required parameters GroupId or PrincipalId is missing.","innerError":{"date":"2024-05-17T12:47:20","request-id":"34a80002-91f0-4429-9abd-6091828259ba","client-request-id":"34a80002-91f0-4429-9abd-6091828259ba"}}})

which is odd because i follow the documentation and the groupId is indeed provided.

Am I doing something wrong? - or is there an error with the API?

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

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 38,196 Reputation points
    2024-05-20T06:39:25.7433333+00:00

    Hi @Søren Herskind Nielsen

    In this API, v1.0 does not support "?filter", do not omit the "$" sign.

    https://graph.microsoft.com/v1.0/identityGovernance/privilegedAccess/group/eligibilitySchedules?$filter=groupId eq '{group_id}'
    

    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.