Random Bad Request and Forbidden responses from certain endpoints

Ian Simpson 21 Reputation points
2021-04-13T00:28:44.063+00:00

I've started getting seemingly random Bad Request and Forbidden responses from Graph. The overall execution of the code does the following:

  1. Create a MS Teams Team be calling POST - https://graph.microsoft.com/v1.0/teams
  2. Add guests to that Team
  3. Create folders for all guests under the main channel
  4. Remove all permissions from folders (aside from "owner" role) and re-add the appropriate guest as the manager of that folder
  5. Create a meeting related to the created Team.

Everything was working fine until today.

  1. I started getting Forbidden responses from POST - groups/{team-id}/events. This was fixed by tweaking the date format. But then
  2. I started getting Bad Request or Forbidden responses from DELETE - groups/{team-id}/drive/items/{item-id}/permissions/{permission-id}
  3. I also began getting Forbidden responses from POST teams/{team-id}/members

These errors are all random. Sometimes I'll get lucky and the request will go through with identical parameters. Error 3 appears to go away if I manually get a new OAuth token before trying the request.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,716 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,886 questions
{count} votes

0 additional answers

Sort by: Most helpful