educationSubmission: unsubmit

Namespace: microsoft.graph

Indicate that a student wants to work on the submission of the assignment after it was turned in. Only teachers, students, and applications with application permissions can perform this operation.

This method changes the status of the submission from submitted to working. During the submit process, all the resources are copied from submittedResources to workingResources. The teacher will be looking at the working resources list for grading.

A teacher can also unsubmit a student's assignment on their behalf.

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) EduAssignments.ReadWriteBasic, EduAssignments.ReadWrite
Delegated (personal Microsoft account) Not supported.
Application Notes.ReadWrite.All, EduAssignments.ReadWrite.All

HTTP request

POST /education/classes/{class-id}/assignments/{assignment-id}/submissions/{submission-id}/unsubmit

Request headers

Header Value
Authorization Bearer {token}. Required.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns 200 Ok response code and an educationSubmission object in the response body.

Example

The following example shows how to call this API.

Request

The following is an example of the request.

POST https://graph.microsoft.com/v1.0/education/classes/72a7baec-c3e9-4213-a850-f62de0adad5f/assignments/7192332b-e904-4891-81e2-356242ab1858/submissions/02bb5de1-7205-2a25-fe33-f99cf53de1c4/unsubmit

Response

The following is an example of the response.

HTTP/1.1 200 Ok

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#educationSubmission",
    "@odata.type": "#microsoft.graph.educationSubmission",
    "status": "returned",
    "submittedDateTime": null,
    "unsubmittedDateTime": "2021-09-07T14:41:18.9512645Z",
    "returnedDateTime": null,
    "resourcesFolderUrl": null,
    "id": "02bb5de1-7205-2a25-fe33-f99cf53de1c4",
    "recipient": {
        "@odata.type": "#microsoft.graph.educationSubmissionIndividualRecipient",
        "userId": "80cefd93-8d88-40e2-b5d3-67898383e226"
    },
    "submittedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "80cefd93-8d88-40e2-b5d3-67898383e226",
            "displayName": null
        }
    },
    "unsubmittedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": "80cefd93-8d88-40e2-b5d3-67898383e226",
            "displayName": null
        }
    },
    "returnedBy": {
        "application": null,
        "device": null,
        "user": {
            "id": null,
            "displayName": null
        }
    }
}

See also