microsoft-graph-api - 不允许使用 Microsoft Graph 教育 API 方法
问题描述
当我尝试在 Graph 资源管理器“ https://graph.microsoft.com/v1.0/education/classes ”中创建课程并提出以下要求时。
{
"description": "Class 9th Frist batch",
"classCode": "9th-A",
"displayName": "9th Class",
"externalId": "11019",
"externalName": "9th Class",
"externalSource": "sis",
"mailNickname": "fineartschool.net"
}
回复:
{
"error": {
"code": "MethodNotAllowed",
"message": "Method not allowed.",
"innerError": {
"request-id": "7daf0b9c-165a-4c18-a2b9-b90a59d00cc6",
"date": "2020-05-19T13:26:06"
}
}
}
我能够列出和创建日历和事件,但我不能创建或列出类。谁能指导我我的帐户有什么问题?为什么我得到以上回应。我如何使用教育 API?
解决方案
这里的问题是 Graph Explorer 使用 Delegated 范围,但Create educationClass端点只接受 Application 范围:
- 委派(工作或学校帐户):不支持。
- 委派(个人 Microsoft 帐户):不支持。
- 应用:
EduRoster.ReadWrite.All
由于不支持委托范围,因此您将无法使用 Graph Explore 创建类。您将需要使用自己的代码/应用程序来请求EduRoster.ReadWrite.All
范围并使用客户端凭据 OAuth 授权来获取您的令牌。
推荐阅读
- php - 使用 ajax 和 jquery 的简单食物跟踪器
- javascript - 键“local_part”的重复条目“0-0”
- javascript - Codeceptjs 无法在不使用元素的情况下滚动/向下滑动
- python - 无法从 angel.co 网站抓取所有数据
- python-3.x - 无法在 Python 3 中从 S3 读取 PNG 文件?
- php - wkhtmltopdf - html 到 pdf 删除左边和底部的空白
- c - 不能将 'const void *' 转换为 'struct struct_name*'
- angular - 使用反应形式将表单字段动态添加到角度无法正确呈现?
- flutter - 我无法为颤动设置路径
- android - 长按 ListActivity 的元素后创建上下文菜单