用户端点的差异

时间:2019-04-25 17:03:59

标签: microsoft-graph microsoft-graph-edu

在我的Azure AD租户中,我使用https://graph.microsoft.com/beta/users的用户很少,而使用https://graph.microsoft.com/beta/education/schools/<id>/usershttps://graph.microsoft.com/beta/education/users的学校的教育用户也是如此

这里有什么区别,我们如何在门户面板中区分它们? 我们可以让普通用户成为特定学校的教育用户吗? 我实际上不是门户网站上的管理员。

1 个答案:

答案 0 :(得分:1)

在AAD级别(这是Azure门户中要显示的内容)之间,对象之间没有区别。

User资源的呈现方式不同。通过/education/users查询“用户”时,还会获得一些其他元数据。例如,如果用户是学生,您将获得educationStudent属性。如果他们是教师,则将看到educationTeacher属性。

educationUser资源还具有educationClasseducationScool的其他导航属性。例如,您可以调用v1.0/education/users/{id}/classes而不是v1.0/users/{id}/classes,因为标准User资源缺少classes导航属性。

同一模型也可以推广到其他领域:

  • educationUser扩展了user资源
  • educationClass扩展了group资源
  • educationSchool扩展了administrativeUnit资源

您可以add an educationUser to an educationSchool这样:

POST https://graph.microsoft.com/v1.0/education/schools/{schoolId}/users/$ref
Content-type: application/json
{
  "@odata.id":"https://graph.microsoft.com/v1.0/education/users/{userId}"
}

顺便说一句,我强烈警告不要使用/beta版本。 Beta版本可能会并且会不时中断。重大更改会在没有警告的情况下发生,因此,其可靠性不足以在生产应用程序中使用。