How to track the number of consumed requests whose resources are not in the main Azure AD storage?

JSG 1 Reputation point
2022-02-16T09:06:30.253+00:00

The user has a number of properties that are not stored in Azure AD, such as

"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

"GET /users"

They also cannot be obtained using the /delta request. 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.

_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. 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
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?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,835 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,856 Reputation points
    2022-02-17T08:55:56.07+00:00

    Hi @JSG , I recommend opening a support ticket for more details on throttling and getting properties stored outside of the main data store.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.