Create assignment with `educationAssignmentPointsGradeType` now return error 400

Tom Ford 26 Reputation points
2021-07-05T10:21:23.053+00:00

We have been using the Education Beta Graph API to create an edit assignments for months without issue.
However something has happened in the last day or so to stop this working. No code changes have happened on our side.

Using this endpoint: https://learn.microsoft.com/en-us/graph/api/educationclass-post-assignments
now returns a 400 bad request with the following error message:

Invalid OData type specified: "microsoft.education.assignments.api.educationAssignmentPointsGradeType"  

This is an urgent problem as our software is now broken for all customers who utilise the link to their Teams for education.
Please advise of any new OData type. Your docs still reference educationAssignmentPointsGradeType.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
{count} vote

Accepted answer
  1. Marc LaFleur 86 Reputation points
    2021-07-19T23:14:32.46+00:00

    Based on the metadata (https://graph.microsoft.com/beta/$metadata), the correct namespace and type should be microsoft.graph.educationAssignmentGradeType. This also aligns with the JSON representation in the Graph documentation:

       json  
       {  
         "id": "String (identifier)",  
         "addedStudentAction": "none",  
         "addToCalendarAction": "string",  
         "allowLateSubmissions": true,  
         "allowStudentsToAddResourcesToSubmission": true,  
         "assignDateTime": "String (timestamp)",  
         "assignTo": {"@odata.type": "microsoft.graph.educationAssignmentRecipient"},  
         "assignedDateTime": "String (timestamp)",  
         "classId": "String",  
         "closeDateTime": "String (timestamp)",  
         "createdBy": {"@odata.type": "microsoft.graph.identitySet"},  
         "createdDateTime": "String (timestamp)",  
         "displayName": "String",  
         "dueDateTime": "String (timestamp)",  
         "grading": {"@odata.type": "microsoft.graph.educationAssignmentGradeType"},  
         "instructions": {"@odata.type": "microsoft.graph.itemBody"},  
         "lastModifiedBy": {"@odata.type": "microsoft.graph.identitySet"},  
         "lastModifiedDateTime": "String (timestamp)",  
         "notificationChannelUrl": "string",  
         "status": "string",  
         "webUrl": "string",  
         "resourcesFolderUrl": "string"  
       }  
    
    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Ivan Lugo 1 Reputation point
    2021-07-09T19:44:04.553+00:00

    Same problem here:

    "Invalid OData type specified: \"microsoft.education.assignments.api.educationAssignmentPointsGradeType\"",

    POST /beta/education/classes/f7cf6fee-2dad-46ce-b52b-dfe539bf7cb7/assignments HTTP/1.1
    Host: graph.microsoft.com
    Authorization: Bearer "removed"
    Content-Type: application/json
    Content-Length: 2402

    {
    "dueDateTime": "2022-01-14T06:58:00+00:00",
    "displayName": "displayname",
    "instructions": {
    "contentType": "html",
    "content": "html"
    },
    "grading": {
    "maxPoints": 10,
    "@odata.type": "#microsoft.education.assignments.api.educationAssignmentPointsGradeType"
    },
    "status": "draft",
    "allowStudentsToAddResourcesToSubmission": true,
    "assignTo": {
    "@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
    }
    }

    It is urgent for me too.

    0 comments No comments

  2. Marc LaFleur 86 Reputation points
    2021-07-19T23:09:46.697+00:00

    Based on the metadata (https://graph.microsoft.com/beta/$metadata), the correct namespace and type should be microsoft.graph.educationAssignmentGradeType. This also aligns with the JSON representation in the Graph documentation:

       json  
       {  
         "id": "String (identifier)",  
         "addedStudentAction": "none",  
         "addToCalendarAction": "string",  
         "allowLateSubmissions": true,  
         "allowStudentsToAddResourcesToSubmission": true,  
         "assignDateTime": "String (timestamp)",  
         "assignTo": {"@odata.type": "microsoft.graph.educationAssignmentRecipient"},  
         "assignedDateTime": "String (timestamp)",  
         "classId": "String",  
         "closeDateTime": "String (timestamp)",  
         "createdBy": {"@odata.type": "microsoft.graph.identitySet"},  
         "createdDateTime": "String (timestamp)",  
         "displayName": "String",  
         "dueDateTime": "String (timestamp)",  
         "grading": {"@odata.type": "microsoft.graph.educationAssignmentGradeType"},  
         "instructions": {"@odata.type": "microsoft.graph.itemBody"},  
         "lastModifiedBy": {"@odata.type": "microsoft.graph.identitySet"},  
         "lastModifiedDateTime": "String (timestamp)",  
         "notificationChannelUrl": "string",  
         "status": "string",  
         "webUrl": "string",  
         "resourcesFolderUrl": "string"  
       }  
    
    0 comments No comments