SOLVED

Microsoft Graph Client - Fetch root site of Office 365 group - Error

%3CLINGO-SUB%20id%3D%22lingo-sub-1204763%22%20slang%3D%22en-US%22%3EMicrosoft%20Graph%20Client%20-%20Fetch%20root%20site%20of%20Office%20365%20group%20-%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1204763%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20are%20running%20a%20program%20to%20create%20a%20office%20365%20group%20using%20Microsoft%20graph%20(Graph%20client%20-%20latest%20stable%20version)%20via%20a%20Azure%20AD%20App.%20The%20same%20program%20tires%20to%20fetch%20the%20root%20site%20of%20the%20group.%3C%2FP%3E%3CP%3EThe%20app%20has%20enough%20permissions%20to%20perform%20both%20operations%20and%20the%20code%20was%20executing.%20Recently%20the%20following%20line%20started%20breaking%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Evar%20%3CSPAN%3EgrpSite%3C%2FSPAN%3E%20%3D%20await%20%3CSPAN%3EgraphClient.Groups%3C%2FSPAN%3E%5B%3CSPAN%3EgrpId%3C%2FSPAN%3E%5D.Sites%5B%22root%22%5D.Request().%3CSPAN%3EGetAsync%3C%2FSPAN%3E()%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20%3CSPAN%3EgrpSite%3C%2FSPAN%3E%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20error%20message%20is%20as%20follows%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMicrosoft.Graph.ServiceException%3A%20Code%3A%20tooManyRetries%3C%2FP%3E%3CP%3EMessage%3A%20More%20than%203%20retries%20encountered%20while%20sending%20the%20request.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnly%20the%20calls%20related%20to%20fetching%20sites%20are%20failing%20-%26nbsp%3B%20we%20are%20using%20V1.0%20graph%20API.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20pointers%20will%20be%20much%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EGoutham%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1204763%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1205921%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%20Client%20-%20Fetch%20root%20site%20of%20Office%20365%20group%20-%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1205921%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183723%22%20target%3D%22_blank%22%3E%40Goutham%20Anandhan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20the%20problem%20is%20caused%20by%20the%20throttling%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fthrottling%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fthrottling%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1309896%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%20Client%20-%20Fetch%20root%20site%20of%20Office%20365%20group%20-%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1309896%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20a%20bug.%26nbsp%3B%20One%20of%20the%20group%20permissions%20is%20creating%20this%20issue.%20Can't%20recall%20exactly%20which%20one%20was%20in%20my%20case%20-%20I%20think%20it%20was%20Group.Selected.%20As%20soon%20you%20remove%20the%20problematic%20permission%20the%20error%20should%20be%20gone.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183723%22%20target%3D%22_blank%22%3E%40Goutham%20Anandhan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi All,

 

We are running a program to create a office 365 group using Microsoft graph (Graph client - latest stable version) via a Azure AD App. The same program tries to fetch the root site of the group.

The app has enough permissions to perform both operations and the code was executing. Recently the following line started breaking 

 

var grpSite = await graphClient.Groups[grpId].Sites["root"].Request().GetAsync();

                return grpSite;

 

The error message is as follows 

 

Microsoft.Graph.ServiceException: Code: tooManyRetries

Message: More than 3 retries encountered while sending the request.

 

Only the calls related to fetching sites are failing -  we are using V1.0 graph API. 

 

Any pointers will be much appreciated.

 

Thanks,

Goutham

 

 

 

 

2 Replies
Highlighted
Highlighted
Best Response confirmed by Goutham Anandhan (New Contributor)
Solution

This is a bug.  One of the group permissions is creating this issue. Can't recall exactly which one was in my case - I think it was Group.Selected. As soon you remove the problematic permission the error should be gone.

@Goutham Anandhan