educationAssignment: getResourcesFolderUrl

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

This function returns the OneDrive URL where all file-based resources (Word, Excel, and so on) should be uploaded.
Note that files must be located in this folder in order to be added as resources. Only a teacher in the class can determine what files to upload.

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.ReadBasic, EduAssignments.Read
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

POST /education/classes/{id}/assignments/{id}/getResourcesFolderUrl

Request headers

Header Value
Authorization Bearer {token}. Required.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 Ok response code. The body will contain the OneDrive URL of a folder in which to put all file-based resources.

Example

The following example shows how to call this API.

Request

The following is an example of a request.

POST https://graph.microsoft.com/beta/education/classes/11012/assignments/19002/getResourcesFolderUrl
Response

The following is an example of a response.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 279

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#Edm.String",
    "value": "https://graph.microsoft.com/v1.0/drives/b!8-QjN2tsv0WyGnTv7vOvnQkmGHbbeMNLqYKONmHLVnvCVmBYIGpeT456457AdW9f/items/017NJZI25NOB5XZNLABF7646XAMDZTQQ6T"
}