【发布时间】:2021-03-22 07:12:52
【问题描述】:
我正在尝试通过https://graph.microsoft.com/v1.0/subscriptions 端点将订阅请求发布到图形 api。但是,我不断收到此错误:
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: InternalServerError; Reason: Expected 1 response for tenant lookup for tenant id ... but received 0]
我的要求:
{
"changeType": "created,updated",
"notificationUrl": "https://.../notification",
"resource": "communications/callRecords",
"expirationDateTime": "2021-03-24T18:23:45.9356913Z",
"clientState": "secretClientValue"
}
我可以使用我的租户 ID 作为 grant_type = client_credentials 获取令牌(OAuth 2.0 客户端凭据授予流程)。尽管令牌创建成功,但我不明白为什么我的租户在订阅时会出错。 我究竟做错了什么?请帮忙!
谢谢。
更新: 我的应用程序的权限:
- Calendars.ReadWrite 应用程序
- CallRecords.Read.All 应用程序
- Directory.ReadWrite.All 应用程序
- OnlineMeetings.Read.All 应用程序
已向所有人授予管理员同意。
【问题讨论】:
-
把资源设为
/communications/callRecords看看。 -
试过这个:“资源”:“/communications/callRecords”。还是一样的错误。
标签: microsoft-graph-api token subscription microsoft-graph-teams