Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/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
Microsoft graph api 订阅推送通知期间出现超时错误_Microsoft Graph Api_Aws Api Gateway - Fatal编程技术网

Microsoft graph api 订阅推送通知期间出现超时错误

Microsoft graph api 订阅推送通知期间出现超时错误,microsoft-graph-api,aws-api-gateway,Microsoft Graph Api,Aws Api Gateway,当我尝试订阅推送通知并使用API网关端点作为通知url时 curl -H 'Content-Type: application/json' -H 'Authorization: Bearer TOKEN' \ -d '{ "changeType": "Created", "expirationDateTime": "2020-09-04T14:48:27.391Z", "n

当我尝试订阅推送通知并使用API网关端点作为通知url时

curl -H 'Content-Type: application/json' -H 'Authorization: Bearer TOKEN' \
-d '{
     "changeType": "Created", 
     "expirationDateTime": "2020-09-04T14:48:27.391Z", 
     "notificationUrl": "AWS_API_GATEWAY/dev/webhooks",
     "resource": "/me/mailfolders('\''inbox'\'')/messages"}' \
-X POST "https://graph.microsoft.com/v1.0/subscriptions"
我得到请求超时错误()

几周前,同样的请求没有任何问题。现在,五分之一的人成功了。 然而,当我执行相同的请求,但将我的ngrok作为通知url(这是非常简单的反向代理到同一个AwsApiGateway
ngrok->ruby proxy stuff->aws api gateway
)时,它工作得非常好

curl -H 'Content-Type: application/json' -H 'Authorization: Bearer TOKEN' \
-d '{
     "changeType": "Created", 
     "expirationDateTime": "2020-09-04T14:48:27.391Z", 
     "notificationUrl": "NGROK_PROXY/dev/webhooks",
     "resource": "/me/mailfolders('\''inbox'\'')/messages"}' \
-X POST "https://graph.microsoft.com/v1.0/subscriptions"
看起来Outlook对我的ApiGateway端点设置了一些限制。不过,我没有在文档中找到任何关于这种行为的解释


任何帮助都将不胜感激

我们的图形订阅端点(由NodeJS Lambda支持的AWS API网关)遇到了这个问题,我们正在努力寻找确切的原因

我们尝试了多种方法来调试正在发生的事情,包括:

  • 检查Lambda执行日志-没有失败的尝试
  • API网关日志-未记录任何内容
  • API网关“访问日志记录”-再次为空
  • 从运行在不同Azure区域的VM调用终结点-没有问题
我们得出了与您类似的结论-Microsoft Graph API(有意或无意)阻止了对AWS API网关端点的订阅请求


我们的解决方案是在API网关端点前面添加一个Route53托管域。自从添加此选项以来,我们没有因“超时”而出现任何故障。

谢谢您的回答!是的,我们还添加了由Route53管理的自定义域
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer TOKEN' \
-d '{
     "changeType": "Created", 
     "expirationDateTime": "2020-09-04T14:48:27.391Z", 
     "notificationUrl": "NGROK_PROXY/dev/webhooks",
     "resource": "/me/mailfolders('\''inbox'\'')/messages"}' \
-X POST "https://graph.microsoft.com/v1.0/subscriptions"