使用API​​和班级笔记本添加学生 [英] Adding Students with the API and Class Notebook

查看:84
本文介绍了使用API​​和班级笔记本添加学生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Graph API为教师和学生构建一个简单的仪表板.一切工作正常,除了添加学生时,他们无权访问班级笔记本,也没有在班级笔记本中为其创建的部门组.

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.

值得注意的是,如果我在Microsoft Teams中打开该类并从中添加或删除任何人,那么通过API添加的所有用户都可以访问并正确创建了他们的部分组.

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.

.Education.Classes["..."].MembersGroups["..."].Members似乎都发生了此行为.成员添加的这种方式也不会出现在团队的管理成员"界面中,但我对此并不担心.

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.

我正在使用v1.0终结点,并且OneDrive和Sharepoint权限均按预期工作.

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?

推荐答案

课堂笔记本"不会自动监视组成员身份.相反,添加成员的体验需要使用Class Notebook API进行匹配的更新.

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.

不幸的是,Class Notebook API尚未直接在Microsoft图形上提供,因此您必须切换到OneNote API端点(使用该令牌刷新您的令牌作为资源)并在那里进行调用.

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.

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆