TooManyRequests Issue Microsoft Teams PowerShell

ivan.demin 1 Reputation point
2020-03-18T14:14:22.637+00:00

Hello,

so our script is connecting MicrosoftTeams via PowerShell and ads new TeamGroup, TeamChannel and TeamUser.
Sometime it works and then in works not and we get the error TooManyRequests like in the picture.

Could it be an performance issue with the API of Microsoft Teams?
What could we do to prevent this error to happening?

Best regards,

Ivan![4911-skript.png]2
4912-skript.png

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,033 questions
0 comments No comments
{count} votes

12 answers

Sort by: Most helpful
  1. Alex Zoutenbier 26 Reputation points
    2020-12-04T13:00:36.423+00:00

    I received a call van support and since yesterday there are issues. They are working on it.

    3 people found this answer helpful.
    0 comments No comments

  2. Alex Zoutenbier 26 Reputation points
    2020-12-07T07:38:03.17+00:00

    At my end it's resolved.

    1 person found this answer helpful.
    0 comments No comments

  3. JimmyYang-MSFT 48,551 Reputation points Microsoft Vendor
    2020-03-19T05:32:25.11+00:00

    Hi Ivan!
    According to your description, it seems this script have no issue.
    Based on my knowledge, to protect Microsoft Teams and its users, the bot APIs rate-limit incoming requests. Apps that go over this limit will receive Too many request error status.
    We recommend your application implement the appropriate backoff behavior when the API returns Too many request. For more details, you can refer to:
    https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/rate-limit

    0 comments No comments

  4. Kai Wollmerstedt (TGIS) 1 Reputation point
    2020-12-04T09:55:06.643+00:00

    Hello Ivan,

    were you able to find a solution to the problem? I have the same error message when I start a get-team query.
    I would also like to know where I can see when I can send a command again.

    get-team : Error occurred while executing 
    Code: TooManyRequests
    Message: Too many requests from Identifier:12128f48-ec9e-42f0-b203-ea49fb6af367+12128f48-ec9e-42f0-b203-ea49fb6af367 under category:throttle.teams.ags.api_complex_level_10.app_normal.operation_read_sustained. Please try again later.
    InnerError:
      RequestId: a808fe0d-ff34-42e4-b902-5ebd5c24cd8a
      DateTimeStamp: 2020-12-04T09:41:11
    HttpStatusCode: TooManyRequests
    At line:1 char:1
    + get-team -User xxx@xxx.com
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-Team], ApiException
        + FullyQualifiedErrorId : Microsoft.TeamsCmdlets.PowerShell.Custom.ErrorHandling.ApiException,Microsoft.TeamsCmdlets.PowerShell.Custom.GetTeam
    

    Best regards
    Kai

    0 comments No comments

  5. Alex Zoutenbier 26 Reputation points
    2020-12-04T11:19:19.65+00:00

    I have the same issues since yesterday.
    Running with Azure Automation new-team command. No change in the code and i'm not able to create a team anymore.

    New-Team : Error occurred while executing Code: TooManyRequests Message: Too many requests from Identifier:12128f48-ec9e-42f0-b203-ea49fb6af367+12128f48-ec9e-42f0-b203-ea49fb6af367 under category:throttle.teams.ags.api_complex_level_10.app_normal.operation_read_sustained. Please try again later. InnerError: RequestId: d71ba7b3-9eb8-424e-aa02-ac24c77b5de3 DateTimeStamp: 2020-12-04T11:08:47 HttpStatusCode: TooManyRequests At line:14 char:12 + $newteam = New-Team -Displayname $teamtitel -Description $teamdescrip ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [New-Team], ApiException + FullyQualifiedErrorId : Microsoft.TeamsCmdlets.PowerShell.Custom.ErrorHandling.ApiException,Microsoft.TeamsCmdlets.PowerShell.Custom.NewTeam

    0 comments No comments