MS Graph Throttling

Gerard Lanphear 0 Reputation points
2023-09-12T17:24:04.94+00:00

I have a GraphServiceClient call. I am having throttling issues and am trying to access the header information that contains the information about the remaining Rate-limit.

It seems as though this header does not exist in a Task<DriveItemCollectionResponse> return object. How can I get this information so that I can cause a delay and avoid throttling?

var task = graphClient
.Drives[_sharePointAssessmentsDriveId]
.Items["root"]
.Children
.GetAsync(requestConfiguration =>
 { 
	requestConfiguration.QueryParameters.Filter = $"name eq '{folderName}'";
 });
 task.Wait();
 return task.Result.Value.SingleOrDefault(e => e.Folder != null)?.Id;
 
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,266 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,578 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sourabh Gupta 795 Reputation points Microsoft Vendor
    2024-06-23T11:39:55.19+00:00

    Hi Gerard Lanphear

    Thanks for reaching out.

    You can refer to this link in order to get more guidance on throttling https://learn.microsoft.com/en-us/graph/throttling

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments