azure - MS Teams 集成和 Microsoft Graph API - 调用事件 API 列表日历时出错 (/me/calendars)
问题描述
我正在尝试将 MS Teams API 集成到 Web 应用程序中。首先,我试图使用 Postman 的 MS API 来查看工作流程。
在 Azure UI 上,我成功创建了一个 App-Registration:我有我的ClientID、TenantID并且我还创建了客户端密码。
我从https://github.com/microsoftgraph/microsoftgraph-postman-collections下载了 Postman API ,我可以检索App-Only Access token。
我在一个组中创建了两个用户,并将他们登录到 MS Teams 应用程序,他们可以聊天。
我还可以获得用户访问令牌和端点,例如
工作正常。
我将用户访问令牌作为请求的承载令牌传递。
我在文件夹事件中遇到端点问题,例如:
他们都给出了同样的错误:
{
"error":{
"code":"NoUserFoundWithGivenClaims",
"message":"The user specified by the user-context in the token does not exist.",
"innerError":{
"oAuthEventOperationId":"08e3abc3-3fdf-4d85-849d-7632ac0723d2",
"oAuthEventcV":"CGW24oLIeEW1qoscgMIMTw.1.1",
"errorUrl":"https://aka.ms/autherrors#error-InvalidUser",
"requestId":"8e6cb242-17fe-4a94-8c89-912606578fb3",
"date":"2021-03-09T12:04:27"
}
}
}
我没有发现任何关于这个错误的信息。有人能帮我吗?谢谢。
解决方案
您可以通过将其放入 jwt.ms 来检查您的不记名令牌,并查看您是否具有“scp”声明中所需的权限。
如果你得到了,MailboxNotEnabledForRESTAPI
那么你需要检查你是否有适当的交换许可证。
您可以通过进入Microsoft 管理中心-> 用户 -> 活动用户 -> 选择您的用户 -> 许可证来添加许可证
推荐阅读
- r - 如何将结果保存在嵌套 for 循环的 list() 中?[R]
- regex - 使用正则表达式匹配 For 循环
- sql - 如何在 SQL 语句中获取带有句点/句号的键?
- java - 想要匹配一个范围字符串(检查正文)
- java - 超时后如何接受 Junit 5 测试?
- spring - Spring Boot 休息控制器:如何返回干净的 json
- c - 如何从标准输入C中获取一行数据
- java - 任何支持调度邮件发送的 API/邮件服务提供商?
- python-3.x - 输入 texbox 上的 V- 模型在 django for 循环中更新其他 v 模型输入文本上的文本
- javascript - 如何与 jest toHaveBeenCalled 一起使用不同的实例