Failed to execute MsGraph backend request GetGroupFromIdS2SRequest.

%3CLINGO-SUB%20id%3D%22lingo-sub-2309845%22%20slang%3D%22en-US%22%3EFailed%20to%20execute%20MsGraph%20backend%20request%20GetGroupFromIdS2SRequest.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2309845%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOur%20CSOM%20code%20throwing%20below%20exception%20when%20we%20trying%20to%20create%20MS%20Teams%20through%20C%23%20based%20console%20application.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EStack%20trace%20-%26nbsp%3B%3C%2FP%3E%3CP%3ESystem.ApplicationException%3A%20Exception%20while%20invoking%20endpoint%20%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%3CGUID%3E%2Fteam%3C%2FGUID%3E%3C%2FA%3E.%20---%26gt%3B%20System.Web.HttpException%3A%20%7B%22error%22%3A%7B%22code%22%3A%22NotFound%22%2C%22message%22%3A%22Failed%20to%20execute%20MsGraph%20backend%20request%20GetGroupFromIdS2SRequest.%20Workload%20MsGraph_DirectoryServices.%20Request%20Url%3A%20%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fedu%2Fgroups%2F%3CGUID%3E%3F%24select%3Did%2CobjectId%2CassignedLabels%2CcreationOptions%2Cclassification%2CdisplayName%2Cdescription%2CgroupTypes%2Cmail%2CmailNickname%2CresourceBehaviorOptions%2CresourceProvisioningOptions%2Cvisibility%2CpreferredDataLocation%2Cextension_fe2174665583431c953114ff7268b7b3_Education_ObjectType%3C%2FGUID%3E%3C%2FA%3E%2C%20Request%20Method%3A%20GET%2C%20Response%20Status%20Code%3A%20NotFound%2C%20Response%20Headers%3A%20Strict-Transport-Security%3A%20max-age%3D31536000%5Cr%5Cnrequest-id%3A%20%3CGUID%3E%5Cr%5Cnclient-request-id%3A%20%3CGUID%3E%5Cr%5CnDate%3A%20Thu%2C%2029%20Apr%202021%2006%3A31%3A17%20GMT%5Cr%5Cn%2C%20Reason%20Phrase%3A%20Not%20Found%22%2C%22innerError%22%3A%7B%22date%22%3A%222021-04-29T06%3A31%3A17%22%2C%22request-id%22%3A%22%3CGUID%3E%22%2C%22client-request-id%22%3A%22%3CGUID%3E%22%7D%7D%7D%3C%2FGUID%3E%3C%2FGUID%3E%3C%2FGUID%3E%3C%2FGUID%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20code%20throw%20an%20exception-%3C%2FP%3E%3CP%3EUnifiedGroupEntity%20unifiedGroupEntity%20%3D%20UnifiedGroupsUtility.CreateUnifiedGroup(unifiedGroupInformation.DisplayName%2C%20unifiedGroupInformation.Description%2C%3CBR%20%2F%3EunifiedGroupInformation.MailNickname%2C%20accessToken%2C%20unifiedGroupInformation.Owners%2C%3CBR%20%2F%3Enull%2C%20true%2C%20true%2C%2010%2C%20500)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20didn't%20get%20the%20exact%20idea%2C%20why%20it%20is%20failing%20because%20some%20times%20it%20works%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20suggest%20your%20input.%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CP%3EBR.%20Sid%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2309845%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

Hello,

 

Our CSOM code throwing below exception when we trying to create MS Teams through C# based console application.

 

Stack trace - 

System.ApplicationException: Exception while invoking endpoint https://graph.microsoft.com/v1.0/groups/<guid>/team. ---> System.Web.HttpException: {"error":{"code":"NotFound","message":"Failed to execute MsGraph backend request GetGroupFromIdS2SRequest. Workload MsGraph_DirectoryServices. Request Url: https://graph.microsoft.com/edu/groups/<guid>?$select=id,objectId,assignedLabels,creationOptions,cla..., Request Method: GET, Response Status Code: NotFound, Response Headers: Strict-Transport-Security: max-age=31536000\r\nrequest-id: <guid>\r\nclient-request-id: <guid>\r\nDate: Thu, 29 Apr 2021 06:31:17 GMT\r\n, Reason Phrase: Not Found","innerError":{"date":"2021-04-29T06:31:17","request-id":"<guid>","client-request-id":"<guid>"}}}

 

This code throw an exception-

UnifiedGroupEntity unifiedGroupEntity = UnifiedGroupsUtility.CreateUnifiedGroup(unifiedGroupInformation.DisplayName, unifiedGroupInformation.Description,
unifiedGroupInformation.MailNickname, accessToken, unifiedGroupInformation.Owners,
null, true, true, 10, 500);

 

We didn't get the exact idea, why it is failing because some times it works as well.

 

Please suggest your input.

Thanks.

BR. Sid

0 Replies