Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
The issue was got fixed in msgraph-sdk-java-core 1.0.9
https://github.com/microsoftgraph/msgraph-sdk-java-core/issues/160
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When graph endpoint for adding tabs POST: /tabs gives throttling (429) error. When RetryHandler calls retryRequest it checks for isBuffered where it requires header Transfer-Encoding as Chunked, in order to send True and to set shouldRetry flag as True.
Issue Class : com.microsoft.graph.httpcore.RetryHandler (microsoft-graph SDK version 2.7.1)
Some times header "Transfer-Encoding = chunked" is missing in the response headers. Causing it to return False. As a result it sets shouldRetry flag as False and it never retry again.
Response Headers :
[
Cache-Control : private,
client-request-id : 5a064a73-9106-40ec-8dff-4069c5752de4,
Content-Length : 885,
Content-Type : application/json,
Date : Fri, 26 Feb 2021 14:03:23 GMT,
request-id : 64638ad8-1f98-49d1-9185-238341d4938e,
Retry-After : 60,
Strict-Transport-Security : max-age=31536000,
x-ms-ags-diagnostic :
{"ServerInfo": {"DataCenter":"SouthIndia","Slice":"SliceC","Ring":"3", "ScaleUnit":"001","RoleInstance":"AGSFE_IN_7" }}
]
Response Body :
{
"error": {
"code": "TooManyRequests",
"message": "Too many requests from Identifier:9155ce04-4eae-42ae-905e-ac219c282f72+786c9214-bb88-448d-9a43-3afeb1518b52+786c9214-bb88-448d-9a43-3afeb1518b52 under category:throttle.teams.ags.api_complex_level_10.tenant_normal.app_normal.operation_write_sustained. Please try again later.",
"innerError": {
"date": "2021-02-26T14:03:23",
"request-id": "64638ad8-1f98-49d1-9185-238341d4938e",
"client-request-id": "5a064a73-9106-40ec-8dff-4069c5752de4",
"status": 429,
"code": "429",
"message": "Too many requests from Identifier:9155ce04-4eae-42ae-905e-ac219c282f72+786c9214-bb88-448d-9a43-3afeb1518b52+786c9214-bb88-448d-9a43-3afeb1518b52 under category:throttle.teams.ags.api_complex_level_10.tenant_normal.app_normal.operation_write_sustained. Please try again later."
}
}
}
Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
An API that connects multiple Microsoft services, enabling data access and automation across platforms
The issue was got fixed in msgraph-sdk-java-core 1.0.9
https://github.com/microsoftgraph/msgraph-sdk-java-core/issues/160
Hi AadityaRane-1988, We have tested the retry handler code using parallel loop by taking threshold limit = 200, didn't face any issue while creating the tab in this scenario. Could you please try with below code.
int i, n = 200;
Parallel.For(0, n, i =>
{
var teamsTab = new TeamsTab
{
DisplayName = "My Tab" + i,
Configuration = new TeamsTabConfiguration
{
EntityId = "2DCA2E6C7A10415CAF6B8AB66121435",
ContentUrl = _configuration["BaseUri"] + "/TestTab" + i,
WebsiteUrl = _configuration["BaseUri"] + "/TestTab" + i
},
AdditionalData = new Dictionary<string, object>()
{
{ "******@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/" + teamsAppId }
}
};
var result = graphClient.Teams[teamId].Channels[channelId].Tabs
.Request()
.AddAsync(teamsTab);
});