如何增加Microsoft Graph API的订阅限制? [英] How to Increase Microsoft Graph API Subscription Limits?

查看:83
本文介绍了如何增加Microsoft Graph API的订阅限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到一种使用图来订阅所有用户更改的方法,它

I have not been able to find a method of using the graph to subscribe to all users changes, it looks like it is not possible.

所以我着手单独订阅每个人,理想情况下,我希望最终从日历,电子邮件和联系人中进行所有更新,但是我从日历开始.

So I set about subscribing to everyone individually, ideally I would like all updates from calendars, email and contacts eventually, but I started with calendars.

该代码仅对我的用户而言是完美的,但是当我尝试向所有人(约300个用户)订阅时,我遇到了一个很大的限制,七个订阅,因为进一步的请求失败了通用的Bad Request状态.

The code works perfectly with just my user, however when I try to subscribe for everyone (around 300 users), I hit a hard a limit, at seven subscriptions, as in further requests fail with a generic Bad Request status.

在官方文档中 https: //developer.microsoft.com/zh-CN/graph/docs/api-reference/v1.0/resources/webhooks 它说:

限制 某些限制适用,超过时可能会产生错误:

Limitations Certain limits apply and may generate errors when exceeded:

1)最大订阅配额

  • 每个应用程序:总订阅50,000个
  • 每个租户:所有应用程序中共有35个订阅
  • 每个应用和租户的组合:7个订阅
  • Per App: 50,000 total subscriptions
  • Per Tenant: 35 total subscriptions across all apps
  • Per App and Tenant combination: 7 total subscriptions

租户似乎是指实际的活动目录,因此每个应用程序我们被限制为7个,即总共35个.

It seems that Tenant refers to an actual active directory, so we are limited to 7 per app, or 35 in total.

将用户划分为多个Active Directory的机会为零,即使同时使用多个应用程序执行相同的操作似乎也很奇怪,这些限制对我来说毫无意义.

There is zero chance of splitting users into multi Active Directories of domains, even juggling multiple apps to do the same thing seems strange, these limits make no sense at all to me.

有没有办法增加这些微小的限制?

我正在订阅users/$email/events,所以我发布到https://graph.microsoft.com/v1.0/subscriptions

I am subscribing to users/$email/events so I post to https://graph.microsoft.com/v1.0/subscriptions

{
   "changeType": "created,updated,deleted",
   "notificationUrl": "https://webhooks.mydomain.com/my/endpoint",
   "resource": "users/$email/events",
   "expirationDateTime":"2018-05-12T16:00:00.9356913Z",
   "clientState": "my-super-secret-identifier"
}

只要我要< = 7订阅,它就可以很好地工作.我还订阅了root/users来查看是否可以进行所有更改,这意味着我只能订阅6个单独的日历.

And it works great, as long as I want <=7 subscriptions. I also subscribed to, the root /users to see if that would give me all changes, which meant I could then only subscribe to 6 individual calendars.

我正在使用官方的PHP库,但是假定/希望都没关系.

I am using the official PHP library, but presume/hope that doesn't matter.

推荐答案

正如杰森(Jason)在评论中说的那样,问题中的限制应该只适用于Active Directory资源,而不是用户级别,现在文档已更改:

As Jason said in the comments, the restriction in the question should only have applied to Active Directory Resources, not on the user level, the docs have now been changed:

Azure AD资源限制

某些限制适用于基于Azure AD 资源(用户,组),并且超出限制可能会产生错误:

Certain limits apply to Azure AD based resources (users, groups) and may generate errors when exceeded:

最大订阅配额:

  • 每个应用程序:总订阅50,000个
  • 每个租户:35个订阅
  • 在所有应用中,每个应用和租户的组合:7个总订阅
  • Per App: 50,000 total subscriptions
  • Per Tenant: 35 total subscriptions
  • across all apps Per App and Tenant combination: 7 total subscriptions

是由于建议的威力引起了问题,还是我不知道的某个地方的暂时性错误,但是Interwebs的众神对我微笑了,我的代码现在可以正常工作了;即使我没有更改它.

Whether it was a case of the power of suggestion causing the issue, or some transient bug somewhere I don't know, but the Gods of the Interwebs have smiled on me, and my code works now; even though I didn't change it.

在我的情况下,删除和添加权限可能有所帮助吗?不确定.

Maybe removing and adding permissions helped in my case? Not sure.

至少现在有文档.

这篇关于如何增加Microsoft Graph API的订阅限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆