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 Education API
Microsoft Graph Education API
A Microsoft API that enhances Microsoft 365 resources with information that is relevant for education scenarios, including information about schools, classes, users (students and teachers), assignments, and submissions.
70 questions
1 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.

  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"  
       }