当我尝试为安全/警报端点创建MicrosoftGraphWeb钩子订阅时,订阅创建将失败,并会出现如下所示的一般消息。将资源修改为“me/messages”将导致创建成功的web钩子订阅,因此这似乎是针对安全/警报端点的。我该怎么通过这件事?

请求的主体如下:
{
"changeType": "created",
"notificationUrl": "https://xxxxxxxxx.azurewebsites.net/api/graphnotifications",
"resource": "security/alerts?$filter=vendorInformation/provider+eq+'ASC'",
"expirationDateTime": "2018-11-15T11:00:00.0000000Z",
"clientState": "secretClientValue"
}发布于 2018-11-15 23:49:22
请使用“更新”表示“转换类型”。安全/警报对所有新的或更新的警报使用“更新”。
发布于 2018-11-15 17:07:34
韦斯,你没有发布你发送请求的URL。根据安全警报的文件。
您可以使用订阅和接收有关实体更新的通知。
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/security-api-overview
在该页面上,它声明提交请求,并给出如下示例
POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json
{
"changeType": "created,updated",
"notificationUrl": "https://webhook.azurewebsites.net/notificationClient",
"resource": "/me/mailfolders('inbox')/messages",
"expirationDateTime": "2016-03-20T11:00:00.0000000Z",
"clientState": "SecretClientState"
}https://developer.microsoft.com/en-us/graph/docs/concepts/webhooks
你是把请求体贴到那个网址上了吗?
https://stackoverflow.com/questions/53308251
复制相似问题