jsonazure-active-directorymicrosoft-graph-apimicrosoft-graph-edu

AccessDenied: Required claim values are not provided when accessing education/users endpoint


I'm unable to access the education/users endpoint but I am able to access other endpoints (education/classes, education/schools).

Whenever I try to get a list of all users, I get the following error:

{
    "error": {
        "code": "AccessDenied",
        "message": "Required claim values are not provided.",
        "innerError": {
            "request-id": "58c42204-440a-482c-b1e9-4c65bb413ed1",
            "date": "2018-03-21T20:23:24"
        }
    }
}

When I try to make the call using the Graph Explorer, I'm given the following notice:

Failure - Status Code - Looks like you may not have the permissions for this call. Please modify your permissions.

Unfortunately, I get the same error after modifying my permissions.

If anyone has any idea why this might be happening, I would be very grateful for the help.


Solution

  • For app+user (delegate) permissions, the only supported scope for the /education/users collection on MSGraph is EduRoster.ReadBasic.

    This supports getting an individual user's information, or information on lists of users within classes of which you are a member, but does NOT support browsing the entire set of users in a tenant, as it is deliberately a restricted scope.

    If you need more than this, you would need to use app-only permissions, and sync the users into your own data store with EduRoster.Read.All, which would allow you to get all of the users.