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.
Get a list of newly-created or updated assignments without reading the entire collection.
A teacher or an application running with application permissions can see all assignment objects for the class. Students can only see assignments that are assigned to them.
Note: This method doesn't return deleted assignments.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
❌ |
❌ |
❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type |
Least privileged permissions |
Higher privileged permissions |
Delegated (work or school account) |
EduAssignments.ReadBasic |
EduAssignments.Read, EduAssignments.ReadWrite, EduAssignments.ReadWriteBasic |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
EduAssignments.ReadBasic.All |
EduAssignments.Read.All, EduAssignments.ReadWrite.All, EduAssignments.ReadWriteBasic.All |
Optional query parameters
This method doesn't support the $expand
, $orderby
, $search
, and $filter
OData query parameters.
This method only supports the $top
OData query parameter.
HTTP request
GET /education/classes/{educationClassId}/assignments/delta
Request body
Don't supply a request body for this method.
Response
If successful, this function returns a 200 OK
response code and an educationAssignment collection in the response body.
Examples
Example 1: Get assignments with delta query support
Request
The following example shows a request.
Use the $top
parameter to specify the number of assignments to be returned. The parameter is optional but use it preferably when you have a long list of assignments. Otherwise, you get all the assignments in the class.
GET https://graph.microsoft.com/beta/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$top=2
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments.Delta.GetAsDeltaGetResponseAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Top = 2;
});
mgc-beta education classes assignments delta get --education-class-id {educationClass-id} --top "2"
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
grapheducation "github.com/microsoftgraph/msgraph-beta-sdk-go/education"
//other-imports
)
requestTop := int32(2)
requestParameters := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetQueryParameters{
Top: &requestTop,
}
configuration := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
delta, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().Delta().GetAsDeltaGetResponse(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
var result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().delta().get(requestConfiguration -> {
requestConfiguration.queryParameters.top = 2;
});
const options = {
authProvider,
};
const client = Client.init(options);
let delta = await client.api('/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta')
.version('beta')
.top(2)
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Education\Classes\Item\Assignments\Delta\DeltaRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new DeltaRequestBuilderGetRequestConfiguration();
$queryParameters = DeltaRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->top = 2;
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->delta()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Education
Get-MgBetaEducationClassAssignmentDelta -EducationClassId $educationClassId -Top 2
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.education.classes.item.assignments.delta.delta_request_builder import DeltaRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters(
top = 2,
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.delta.get(request_configuration = request_configuration)
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
Note: Take the @odata.nextLink
from the response to make another call and get the next set of assignments.
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 344
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignments",
"@odata.nextLink": "https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/delta?$skiptoken=HDIHJlrsxOh2yxHa79l9z_WDNaTi8Rr88OsgpWAOWe76OgL-8eiUedDTjr0ELgWND5Dq2vqAD_dx6DFdJVNfldHxacVogZhBUSt3-2-oOxnYNIwi8cIqPDPPwEifGyl0z1ib8amdL9sy6YHDZSC8lioiL3l8HUtH7-XcKEMpm-5r2NFBDV5jckzIa3h7cvE3.P2GZ6gBhsoq9mHSKFt98t9oCOaydK4TZyYSBdRjJP9o",
"value": [
{
"classId": "37d99af7-cfc5-4e3b-8566-f7d40e4a2070",
"displayName": "Grade assignment 15 May 01",
"closeDateTime": null,
"dueDateTime": "2025-05-16T18:29:00Z",
"assignDateTime": null,
"assignedDateTime": "2025-05-15T16:37:18.746146Z",
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"feedbackResourcesFolderUrl": "https://graph.microsoft.com/beta/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F8CNZWU38SarWxPyWM7jx/items/01VANVJQ7ONF5UOYTXZVEKCZE43FTQRH2S",
"createdDateTime": "2025-05-15T16:36:18.6392125Z",
"lastModifiedDateTime": "2025-05-15T16:37:18.8188179Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "assigned",
"notificationChannelUrl": "https://graph.microsoft.com/beta/teams/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/channels/37d99af7-cfc5-4e3b-8566-f7d40e4a2070",
"webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7B%22subEntityId%22%3A%22%7B%5C%22version%5C%22%3A%5C%221.0%5C%22,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%2237d99af7-cfc5-4e3b-8566-f7d40e4a2070%5C%22,%5C%22assignmentIds%5C%22%3A%5B%5C%220965958c-84f2-4ca4-b854-05cce3440aa4%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22,%5C%22appId%5C%22%3A%5C%22de8bc8b5-d9f9-48b1-a8ad-b748da725064%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addToCalendarAction": "studentsAndTeamOwners",
"addedStudentAction": "assignIfOpen",
"languageTag": "en-US",
"moduleUrl": "https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/modules/dcc2ba3e-1bf2-43fc-9f12-e9acd916b372/",
"id": "0965958c-84f2-4ca4-b854-05cce3440aa4",
"instructions": {
"content": "Grade assignment 15 May 01",
"contentType": "html"
},
"grading": {
"@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
"maxPoints": 100
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "5e3ce6c0-2b1f-4285-8d4b-75ee78787346",
"displayName": null
}
}
}
]
}
Example 2: Get next set of assignments with delta query support
Request
The following example shows a request.
Use the @odata.nextLink
value from the previous call for this request.
GET /education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$skiptoken=U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
// Note: The URI string parameter used with WithUrl() can be retrieved using the OdataNextLink or OdataDeltaLink property from a response object
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments.Delta.WithUrl("https://graph.microsoft.com/beta/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$skiptoken=U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs").GetAsDeltaGetResponseAsync();
mgc-beta education classes assignments delta get --education-class-id {educationClass-id}
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
grapheducation "github.com/microsoftgraph/msgraph-beta-sdk-go/education"
//other-imports
)
requestSkiptoken := "U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs"
requestParameters := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetQueryParameters{
Skiptoken: &requestSkiptoken,
}
configuration := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
delta, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().Delta().GetAsDeltaGetResponse(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.education.classes.item.assignments.delta.DeltaRequestBuilder deltaRequestBuilder = new com.microsoft.graph.beta.education.classes.item.assignments.delta.DeltaRequestBuilder("https://graph.microsoft.com/beta/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$skiptoken=U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs", graphClient.getRequestAdapter());
com.microsoft.graph.beta.education.classes.item.assignments.delta.DeltaGetResponse result = deltaRequestBuilder.get();
const options = {
authProvider,
};
const client = Client.init(options);
let delta = await client.api('/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta')
.version('beta')
.skiptoken('U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Education\Classes\Item\Assignments\Delta\DeltaRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new DeltaRequestBuilderGetRequestConfiguration();
$queryParameters = DeltaRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->skiptoken = "U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->delta()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Education
Get-MgBetaEducationClassAssignmentDelta -EducationClassId $educationClassId -Skiptoken "U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.education.classes.item.assignments.delta.delta_request_builder import DeltaRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters(
skiptoken = "U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FDy9b1hMDaAJGdLb7n2fh1IdHoweKQs1czM4Ry1LVsNqwIFXftTcRHvgSCbcszvbJHEWDCO3QO7K7zwCM8DdXNepZOa1gqldecjIUM0NFRbGQoQ5yR6RmGnMgtko8TDMOyMH_yg1my82PTXA_t4Nj-DhMDZWvuNTd_lbLeTngc7mIJPMCR2gHN9CSKsW_kw850.UM9tUqwOu5Ln1pnxaP6KdMmfJHszGqY3EKPlQkOiyGs",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.delta.get(request_configuration = request_configuration)
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
Note: You must continue using the @odata.nextLink
value for the consequent calls until you get the @odata.deltaLink
property in the response.
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 344
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(educationAssignment)",
"@odata.deltaLink": "https://graph.microsoft.com/beta/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$deltatoken=7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs",
"value": [
{
"@odata.type": "#microsoft.graph.educationAssignment",
"classId": "72a7baec-c3e9-4213-a850-f62de0adad5f",
"displayName": "Expand options 2",
"closeDateTime": null,
"dueDateTime": "2021-11-12T07:59:00Z",
"assignDateTime": null,
"assignedDateTime": "2021-11-10T23:54:15.9533379Z",
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"createdDateTime": "2021-11-10T23:51:08.8548584Z",
"lastModifiedDateTime": "2021-11-10T23:54:17.4687411Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "assigned",
"notificationChannelUrl": null,
"webUrl": null,
"addToCalendarAction": "none",
"addedStudentAction": "none",
"grading": null,
"id": "efa3b9a8-b41f-4263-adc5-738c01912153",
"instructions": {
"content": "",
"contentType": "text"
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "f3a5344e-dbde-48b0-be24-b5b62a243836",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "AAAAAAAA-0123-4567-89AB-1B4BB48C3119",
"displayName": null
}
}
}
]
}
Example 3: Get the created and modified assignments using delta token
Request
The following example shows a request.
Use the @odata.deltaLink
value from the previous call for this request.
GET /education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$deltatoken=7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
// Note: The URI string parameter used with WithUrl() can be retrieved using the OdataNextLink or OdataDeltaLink property from a response object
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments.Delta.WithUrl("https://graph.microsoft.com/beta/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$deltatoken=7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs").GetAsDeltaGetResponseAsync();
mgc-beta education classes assignments delta get --education-class-id {educationClass-id}
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
grapheducation "github.com/microsoftgraph/msgraph-beta-sdk-go/education"
//other-imports
)
requestDeltatoken := "7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs"
requestParameters := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetQueryParameters{
Deltatoken: &requestDeltatoken,
}
configuration := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
delta, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().Delta().GetAsDeltaGetResponse(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.education.classes.item.assignments.delta.DeltaRequestBuilder deltaRequestBuilder = new com.microsoft.graph.beta.education.classes.item.assignments.delta.DeltaRequestBuilder("https://graph.microsoft.com/beta/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$deltatoken=7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs", graphClient.getRequestAdapter());
com.microsoft.graph.beta.education.classes.item.assignments.delta.DeltaGetResponse result = deltaRequestBuilder.get();
const options = {
authProvider,
};
const client = Client.init(options);
let delta = await client.api('/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Education\Classes\Item\Assignments\Delta\DeltaRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new DeltaRequestBuilderGetRequestConfiguration();
$queryParameters = DeltaRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->deltatoken = "7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->delta()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Education
Get-MgBetaEducationClassAssignmentDelta -EducationClassId $educationClassId -Deltatoken "7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.education.classes.item.assignments.delta.delta_request_builder import DeltaRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters(
deltatoken = "7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klERNmJQjnBn7MHqwXZ6L8GlI3VPnya3E-p1bisiZX97jLvQUAopseIYhvnD6v7fiYrk.fVsHempT6X2CiBh6aN9Ex5nVJ71adKdcf-mdke8OHKs",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.delta.get(request_configuration = request_configuration)
Response
The following example shows the response.
Note: You must continue using the @odata.deltaLink
to get the newly created or modified assignments since the initial Delta call.
Sometimes the delta response will be very large in which case an @odata.nextLink
will be returned to continue fetching changes until you hit an @odata.deltaLink
again.
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 344
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(educationAssignment)",
"@odata.deltaLink": "https://graph.microsoft.com/beta/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/delta?$deltatoken=7ORzTfzlUEGDy6BRE3OC-3ePBbvLHCRe4aJ_hjaBKJxUHmn_ODgoM4xreLS7YRaxROmLjac48n-iXm5j6n5aQwlsnC-2OvL3lI0Z8M4klER9TeVMFnEEWX3TRYFAJe1nNUp5s0cjvqM59nMNhcFoIhmt6RUUcXe6vlP9yy00ADA.gT8PrGKC3hZnt4oDxMAmjyX50EASWG4KNcc1E9yTRRo",
"value": [
{
"@odata.type": "#microsoft.graph.educationAssignment",
"classId": "72a7baec-c3e9-4213-a850-f62de0adad5f",
"displayName": "expand options 2 updated for delta",
"closeDateTime": null,
"dueDateTime": "2021-11-12T07:59:00Z",
"assignDateTime": null,
"assignedDateTime": "2021-11-10T23:54:15.9533379Z",
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"createdDateTime": "2021-11-10T23:51:08.8548584Z",
"lastModifiedDateTime": "2021-11-16T15:17:07.518655Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "assigned",
"notificationChannelUrl": null,
"webUrl": null,
"addToCalendarAction": "none",
"addedStudentAction": "none",
"grading": null,
"id": "efa3b9a8-b41f-4263-adc5-738c01912153",
"instructions": {
"content": "",
"contentType": "text"
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "f3a5344e-dbde-48b0-be24-b5b62a243836",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "f3a5344e-dbde-48b0-be24-b5b62a243836",
"displayName": null
}
}
}
]
}
Example 4: Using $select
to get selected data
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/delta?$select=displayName,id
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments.Delta.GetAsDeltaGetResponseAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Select = new string []{ "displayName","id" };
});
mgc-beta education classes assignments delta get --education-class-id {educationClass-id} --select "displayName,id"
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
grapheducation "github.com/microsoftgraph/msgraph-beta-sdk-go/education"
//other-imports
)
requestParameters := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetQueryParameters{
Select: [] string {"displayName","id"},
}
configuration := &grapheducation.ClassesItemAssignmentsDeltaRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
delta, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().Delta().GetAsDeltaGetResponse(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
var result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().delta().get(requestConfiguration -> {
requestConfiguration.queryParameters.select = new String []{"displayName", "id"};
});
const options = {
authProvider,
};
const client = Client.init(options);
let delta = await client.api('/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/delta')
.version('beta')
.select('displayName,id')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Education\Classes\Item\Assignments\Delta\DeltaRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new DeltaRequestBuilderGetRequestConfiguration();
$queryParameters = DeltaRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->select = ["displayName","id"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->delta()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Education
Get-MgBetaEducationClassAssignmentDelta -EducationClassId $educationClassId -Property "displayName,id"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.education.classes.item.assignments.delta.delta_request_builder import DeltaRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters(
select = ["displayName","id"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.delta.get(request_configuration = request_configuration)
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(educationAssignment)",
"@odata.nextLink": "https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/delta?$skiptoken=U43TyYWKlRvJ6wWxZOfJvkp22nMqShRw9f-GxBtG2FBcWCIKOSenQFv_rF12_tcPmr6GwzMmFb15rLKFgPCB9AMyomQQBsp8rpPB7REHVRY72dH9ygXt_v5J1THi6kEL_8e3gkl9GNBOgD75V4zUe2HWxrbhLZJFQSSRKQZ0t17wpjUSGULoPPeRrR5w4jWj3547BmlwhJydTPtrNqhNhgpWiDkoyMdfMlb4-T0uqrk.kp0pIEG4F09nMMbrh4ww0iChxBI7LqWNS6y2zQK3w7E",
"value": [
{
"@odata.type": "#microsoft.graph.educationAssignment",
"displayName": "09/28/2023 15:16:00",
"id": "e78063b9-73fc-4fbf-a33f-d0d800b53919"
},
{
"@odata.type": "#microsoft.graph.educationAssignment",
"displayName": "Reading test 09.14 Beta",
"id": "c2eeaaf2-766c-4b90-9a17-61625bc5a47d"
},
{
"@odata.type": "#microsoft.graph.educationAssignment",
"displayName": "Monica Demo page",
"id": "933b7a41-8993-4ee3-ab48-9fe5398d4ec7"
},
{
"@odata.type": "#microsoft.graph.educationAssignment",
"displayName": "Geography Handout",
"id": "41448a5b-4fc6-4623-b676-1a244ed21f76"
},
{
"@odata.type": "#microsoft.graph.educationAssignment",
"displayName": "2023-07-26T19:04:55.525Z6684",
"id": "2cb9ce0c-a4a1-40b8-b386-b43e0f05e7ed"
}
]
}