[英]How to track the number of consumed requests whose resources are not in the main Azure AD storage?
The user has a number of properties that are not stored in Azure AD, such as用户有一些属性没有存储在Azure AD中,比如
"aboutMe, birthday, hireDate, interests, mySite, pastProjects, preferredName, responsibilities, schools, skills"
They also cannot be obtained using the request https://learn.microsoft.com/en-us/graph/delta-query-overview#properties-stored-outside-of-the-main-data-store它们也无法使用请求https://learn.microsoft.com/en-us/graph/delta-query-overview#properties-stored-outside-of-the-main-data-store获得
"GET /users"
They also cannot be obtained using the /delta
request.它们也无法使用
/delta
请求获得。 If there are a lot of users in AAD, for example, more than 9,000, then to get these properties it will be necessary to make a request for each user to get these attributes.如果 AAD 中有很多用户,例如超过 9,000 个,那么要获取这些属性,就需要为每个用户发出获取这些属性的请求。
_graphClient.Users[id].Request().Select("aboutMe, birthday, hireDate, interests, mySite, pastProjects, preferredName, responsibilities, schools, skills, id");
And this will lead to the second problem that I encountered code I get information about all these users in less than 10 minutes.这将导致我遇到的第二个问题,我在不到 10 分钟的时间内就获得了所有这些用户的信息。 This is the Retry-After response after about 9,000 requests.. The documentation says that there is an additional header
"x-ms-throttle-limit-percentage"
which notifies how many resources are left for these requests before the "Retry-After"
will work, but I did not receive this header for this type of requests这是大约9,000 个请求后的 Retry-After 响应。文档说还有一个额外的 header
"x-ms-throttle-limit-percentage"
,它通知在"Retry-After"
之前这些请求还剩下多少资源可以,但我没有收到此类请求的 header
https://learn.microsoft.com/en-gb/graph/throttling?view=graph-rest-1.0#regular-responses-requests https://learn.microsoft.com/en-gb/graph/throttling?view=graph-rest-1.0#regular-responses-requests
I have a question, the header "x-ms-throttle-limit-percentage"
should come for properties that are outside of AAD, for example in SharePoint Online?我有一个问题,header
"x-ms-throttle-limit-percentage"
应该来自 AAD 之外的属性,例如 SharePoint Online?
Please go through service-specific limits as described here .请通过此处所述的服务特定限制拨打 go。
As general guidance please note that if no Retry-After header is provided by the response, we recommend implementing an exponential backoff retry policy.作为一般指导,请注意,如果响应未提供 Retry-After header,我们建议实施指数退避重试策略。 You can also implement more advanced patterns when building large-scale applications.
您还可以在构建大型应用程序时实施更高级的模式。
Microsoft Graph SDKs already implement handlers that rely on the Retry-After header or default to an exponential backoff retry policy. Microsoft Graph SDK 已经实现了依赖 Retry-After header 或默认指数退避重试策略的处理程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.