Working with education APIs in Microsoft Graph

The education APIs in Microsoft Graph enhance Microsoft 365 resources and data with information that is relevant for education scenarios, including schools, students, teachers, classes, and enrollments. This makes it easy for you to build solutions that integrate with educational resources.

The education APIs include rostering resources and assignments resources that you can use to interact with the rostering services in Microsoft Teams. You can use these resources to manage a school roster.

Authorization

To call the education APIs in Microsoft Graph, your app will need to acquire an access token. For details about access tokens, see Get access tokens to call Microsoft Graph. Your app will also need the appropriate permissions. For more information, see Education permissions.

To deploy apps that are integrated with the Education APIs in Microsoft Graph, school IT admins must first grant consent to the permissions requested by the app. This consent has to be granted only once, unless the permissions change. After the admin consents, the app is provisioned for all users in the tenant.

To show a consent dialog box, use the following REST call.

GET https://login.microsoftonline.com/{tenant}/adminconsent?
client_id={clientId}&state=12345&redirect_uri={redirectUrl}
Parameter Description
Tenant Tenant ID of the school. Use the full ID, which includes onmicrosoft.com.
clientId Client ID of the app.
redirectUrl App redirect URL.

Rostering

The rostering APIs enable you to extract data from a school's Microsoft 365 tenant provisioned with Microsoft School Data Sync. These APIs provide access to information about schools, sections, teachers, students, and rosters. The APIs support both app-only (sync) scenarios, and app + user (interactive) scenarios. The APIs that support interactive scenarios enforce region-appropriate RBAC policies based on the user role calling the API. This provides a consistent API and minimal policy surface, regardless of the administrative configuration within tenants. In addition, the APIs also provide education-specific permissions to ensure that the right user has access to the data.

You can use the rostering APIs to enable an app user to know:

  • Who I am
  • What classes I attend or teach
  • What I need to do and by when

The rostering APIs provide the following key resources:

The rostering APIs support the following scenarios:

Assignments

You can use the assignment-related education APIs to integrate with assignments in Microsoft Teams. Microsoft Teams in Microsoft 365 for Education is based on the same education APIs, and provides a use case for what you can do with the APIs. Your app can use these APIs to interact with assignments throughout the assignment lifecycle.

The assignment APIs provide the following key resources:

  • educationAssignment - The core object of the assignments API. Represents a task or unit of work assigned to a student or team member in a class as part of their study.
  • educationSubmission - Represents the resources that an individual (or group) submits for an assignment and the associated grade and feedback for that assignment.
  • educationResource - Represents the learning object that is being assigned or submitted. An educationResource is associated with an educationAssignment and/or an educationSubmission.

The assignment APIs support the following scenarios:

The following are some common use cases for the assignment-related education APIs.

Use case Description See also
Create assignments An external system can create an assignment for the class and attach resources to the assignment. Create assignment
Read assignment information An analytics application can get information about assignments and student submissions, including dates and grades. Get assignment
Track student submissions Your app can provide a teacher dashboard that shows how many submissions from students need to be graded. Submission resource

Next steps

Use the Microsoft Graph education APIs to build education solutions that access school rosters. To learn more:

  • Explore the resources and methods that are most helpful to your scenario.
  • Try the API in the Graph Explorer.