https://docs.microsoft.com/en-us/graph/api/educationuser-get?view=graph-rest-beta
This endpoint does not work:
https://graph.microsoft.com/beta/education/users/{id}/assignments
`{
"error": {
"code": "",
"message": "No HTTP resource was found that matches the request URI 'https://assignments.onenote.com/api/v1.0/edu/me/assignments/{id}.",
"innerError": {
"request-id": "9d448967-c55a-4924-b766-8c56f4b66e02",
"date": "2019-03-06T10:56:58"
}
}
}`
The following endpoints work:
https://graph.microsoft.com/beta/education/users/{id}/schools
https://graph.microsoft.com/beta/education/users/{id}/classes
https://graph.microsoft.com/beta/education/users/{id}/user
https://graph.microsoft.com/beta/education/me/assignments
Thank you for reporting this. I've been able to replicate this issue. It looks like an error in the OData manifest; working to confirm this.
That said, this endpoint _only_ supports listing assignments for the _current User. As such, I would recommend using /me for this call for the time being
Thank you for reporting this. I've been able to replicate this issue. It looks like an error in the OData manifest; working to confirm this.
That said, this endpoint _only_ supports listing assignments for the _current User. As such, I would recommend using
/mefor this call for the time being
The endpoint appears to supports any users schools, classes and user details. I assumed assignments would also be supported.
Can I please advocate for this functionality? We are wanting to develop an API that allows teachers to monitor any students assignments and this endpoint would allow for that.
I absolutely understand why you'd assume it would work this way, and it is certainly a reasonable ask. Without going _too_ deep into the weeds, the complexity stems from Schools, Classes, and Users being AAD objects while Assignments belong to OneNote. Currently, the Assignments API behind the scenes only gets the authenticated user from the token so it doesn't know what to do with /users/{id}. I'll make sure you request is logged so it can get looked into by the team that owns that API.
Thanks for the explanation, appreciate it.
Yes, please pass on the feedback as this would make life much easier for us.
Other scenarios that would benefit from this:
A parent/guardian view that allows parents to view their child's assignments.
Pastoral leaders and guidance counselors can monitor the workload of students for wellbeing
Most helpful comment
I absolutely understand why you'd assume it would work this way, and it is certainly a reasonable ask. Without going _too_ deep into the weeds, the complexity stems from Schools, Classes, and Users being AAD objects while Assignments belong to OneNote. Currently, the Assignments API behind the scenes only gets the authenticated user from the token so it doesn't know what to do with
/users/{id}. I'll make sure you request is logged so it can get looked into by the team that owns that API.