问题
I'm using the Graph API to construct a simple Dashboard for Teachers and Students. Everything works well except that when a Student is added they do not get access to the Class Notebook and they don't get a Section Group for them created in the Class Notebook.
Notably, if I open the Class in Microsoft Teams and add or remove anyone from it then all of the users that have been added through the API get access and their section groups created correctly.
This behavior seems to happen both with .Education.Classes["..."].Members
and Groups["..."].Members
. The Members added this way also don't show up in the Teams "Manage Members" interface but I'm not concerned about that.
I'm using the v1.0 endpoint, and OneDrive and Sharepoint permissions all work as expected.
My question is do I have to do something extra to get the Class Notebook updated with the membership or are there some additional properties that need to be sent when adding a user or is this just a bug?
回答1:
The Class Notebook doesn't automatically watch the group membership. Rather experiences that add members need to use Class Notebook APIs to do the matching update.
Unfortunately, the Class Notebook APIs aren't yet available directly on the Microsoft graph, so you have to switch over to the OneNote API endpoint (refresh your token with that as the resource) and make the call there.
This is the API you need
来源:https://stackoverflow.com/questions/53452782/adding-students-with-the-api-and-class-notebook