The response code question of sending messages to the Teams from Bot or Graph?

Mu, Colin Yongying 20 Reputation points
2023-04-13T06:53:01.9133333+00:00

I sent messages to Teams with Graph API (Graph API is same with Bot Framework), but can you tell me what kind of response code and message will be returned when Teams failure occurs in the Microsoft? If a failure occurs in Teams internal, it is assumed that only 5XX series will be returned, is that correct? The 4XX series will not be returned, won't they? ”

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,627 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,446 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-04-13T07:17:02.9833333+00:00

    Hello Mu, Colin Yongying,

    Thanks for reaching out!

    The response codes and messages returned when using the Microsoft Graph API to send messages to Teams can change depending on the precise scenario and type of failure that happens. However, generally speaking, the following rules apply:

    • Client errors (4XX): If there is an issue with the request made by the client, such as providing incorrect or incomplete data, the API may return a 4XX series status code (e.g., 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found). These codes indicate that the request was malformed or invalid, and the error message in the response body will typically provide details about the specific issue.
    • Server errors (5XX): If there is a failure on the server-side, such as an internal error within Teams, the API may return a 5XX series status code (e.g., 500 Internal Server Error, 503 Service Unavailable). These codes indicate that the server encountered an issue while processing the request, and the error message in the response body may provide additional information about the problem. Please refer to the Microsoft Graph error responses documentation for more details.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more