microsoft-graph-api - Microsoft Graph 订阅 - 通话记录
问题描述
所以我有一个用例,我需要接收来自 Microsoft Teams 通话的通话记录。我在 Microsoft Graph 调用上找到了允许这样做的文档,位于:( https://docs.microsoft.com/en-us/graph/api/callrecords-callrecord-get?view=graph-rest-1.0 )。
在此页面中,它还提到可以使用 Graph Subscriptions 将通话记录发送到网络挂钩。(https://docs.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs=http)。
它说我需要向https://graph.microsoft.com/CallRecords.Read.All授予应用程序 API 权限。我创建了一个只有此权限的新应用程序注册。
我为该组织做了行政许可。
我从https://login.microsoftonline.com/{tenantId}/v2.0请求了一个不记名令牌,范围为https://graph.microsoft.com/.default。
我发布到https://graph.microsoft.com/v1.0/subscriptions,正文如下:
{
"changeType": "created",
"notificationUrl": "xxx",
"resource": "/communications/callRecords",
"expirationDateTime": "2021-03-03T11:00:00.0000000Z"
}
在接收通知的端点上,我正在使用验证令牌进行回复,并且我看到请求/响应从 Graph API 传入我的端点,并且它成功返回了带有令牌的 200。
我的帖子回复返回 403 Forbidden。
{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: Forbidden; Reason: The request is not authorized for this user or application.]",
"innerError": {
"date": "2021-03-02T15:32:36",
"request-id": "21ac082f-e2a4-41e0-badf-4672e5b05cc8",
"client-request-id": "21ac082f-e2a4-41e0-badf-4672e5b05cc8"
}
}
}
关于我缺少哪一步的任何想法?
解决方案
确保您指向正确的应用注册
推荐阅读
- flutter - 测试提供者时上下文不匹配
- sql-server - Ansible 安装 SQL Server Express 2016
- sql - 基于主查询中的列的子查询
- compression - 卡卡杜,体积图像上的多分量变换
- java - 如何在 Firebase 中添加图像列表?
- c++ - 关于 C++ 语言中 strrev() 函数的问题
- angular - 接收对象数组asp net API
- django - AppConfig.label 可以用于从应用程序导入模块吗?
- javascript - 如何在 Stencil.js 中使用外部第三方库
- java - 解析 SQL 并替换 Java 中的参数