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 SDK
Microsoft Graph SDK
A Microsoft software developer kit designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
992 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.
8,985 questions
{count} votes