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".