microsoft-graph-apimicrosoft-graph-edu

Batch enroll multiple educationUsers to educationClass


In the beta (and v1.0) endpoints of the Microsoft graph, for "education", is there a way to add multiple teachers and members (educationUser references) to an "educationClass"?

POST /education/classes/{id}/members/$ref

{
  "@odata.id":"https://graph.microsoft.com/v1.0/education/users/XXXXX"
}

Right now, it seems that one by one is added instead of batch applying this in the same fashion as when adding members and owners to teams.

Something like this? (fictive request)

"teachers@odata.bind": [
    "https://graph.microsoft.com/v1.0/education/users/AAAAA",
    "https://graph.microsoft.com/v1.0/education/users/BBBBB"
],
"members@odata.bind": [
    "https://graph.microsoft.com/v1.0/education/users/CCCCC",
    "https://graph.microsoft.com/v1.0/education/users/DDDDD"
]

Either in a separate $ref operation or directly on the educationClass creation request object.

Is this something I've just been missing when looking in the doc? If not, is this something the Microsoft Graph Education team might consider in a future version of the beta endpoint?


Solution

  • Currently, the group resource (and by extension educationClass) only supports adding one Owner/Member at a time. You may want to look into the JSON Batching functionality. Batching allows you to queue up to 20 Graph calls in a single request.

    For managing Teacher, Student, and Class assignment at scale, I'd suggest looking at School Data Sync (SDS). SDS allows you to automatically keep your AAD in sync with a Student Information System.