Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure functions Azure函数的图形API挂钩_Azure Functions_Microsoft Graph Api - Fatal编程技术网

Azure functions Azure函数的图形API挂钩

Azure functions Azure函数的图形API挂钩,azure-functions,microsoft-graph-api,Azure Functions,Microsoft Graph Api,我正在创建一个Microsoft graph webhook,以便在新电子邮件到达我的收件箱时触发Azure函数 我的设置是: 具有MSGraph“Outlook邮件webhook创建者”的dotnet Azure函数 多租户Microsoft应用程序,以便my Azure Active Directory可以请求 权限Mail.Read 问题是:在接受请求的权限后,Graph返回“无效请求”订阅验证请求失败。必须以200 OK响应此请求。 我还尝试通过手动创建订阅,但错误是一致的 根

我正在创建一个Microsoft graph webhook,以便在新电子邮件到达我的收件箱时触发Azure函数

我的设置是:

  • 具有MSGraph“Outlook邮件webhook创建者”的dotnet Azure函数

  • 多租户Microsoft应用程序,以便my Azure Active Directory可以请求 权限
    Mail.Read
问题是:在接受请求的权限后,Graph返回“无效请求”
订阅验证请求失败。必须以200 OK响应此请求。

我还尝试通过手动创建订阅,但错误是一致的

根据错误,请求正文中的
通知URL
无效

订阅通知终结点(在
notificationUrl
属性中指定)必须能够响应中所述的验证请求。如果验证失败,创建订阅的请求将返回400错误请求错误

POST https://graph.microsoft.com/v1.0/subscriptions
Content-type: application/json

{
   "changeType": "created,updated",
   "notificationUrl": "https://webhook.azurewebsites.net/api/send/myNotifyClient",
   "resource": "me/mailFolders('Inbox')/messages",
   "expirationDateTime":"2016-11-20T18:23:45.9356913Z",
   "clientState": "secretClientValue"
}

请参阅参考-。

如果my Azure函数的类型为“Outlook message webhook creator”,Azure是否应该注意您所说的内容?订阅通知端点必须能够响应验证请求?这就是“扩展”的要点在用于创建订阅的Azure Functions@Gantoniid中,它不会创建webhook通知客户端。如果您的通知URL无效,您希望将通知发送到哪里?那么,您能否确保您的
通知URL
有效?