Add a student

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Add an educationUser member to an educationClass.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Not supported.
Delegated (personal Microsoft account) Not supported.
Application EduRoster.ReadWrite.All plus Member.Read.Hidden

HTTP request

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

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json

Request body

In the request body, supply a JSON representation of an educationUser object.

Response

If successful, this method returns a 204 No Content response code and an educationClass object in the response body.

Example

Request

The following is an example of the request.

POST https://graph.microsoft.com/beta/education/classes/11011/members/$ref
Content-type: application/json

{
  "@odata.id":"https://graph.microsoft.com/beta/education/users/13015"
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content