Authentication errors when sending messages to Teams

Keita Yamashiro 61 Reputation points

The API is used in the following process.

  1. get token
  2. send a message to Teams using the obtained token

However, after you change the password of your Microsoft account, you will not be able to send messages to Teams.
You can get a token or update it with a refresh token.

The following APIs will generate error Unauthorized.{team_id}/channels/{channel_id}/messages

If I change the password of my Microsoft account, will I not be able to use the Teams API?
I would appreciate it if someone could tell me.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,397 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.
3,056 questions
{count} votes

Accepted answer
  1. Ramjot Singh 861 Reputation points Microsoft Employee

    We are tracking an issue where changing password can result into it taking a long time to get access to the API again (upto 1 day). For now if you wait for a day you should get access to the API again.

1 additional answer

Sort by: Most helpful
  1. Vasil Michev 100.1K Reputation points MVP

    Microsoft (personal) accounts are not supported for that endpoint, as documented here:
    You need to use a work/Office 365 account. Other than that, make sure you have the required permissions.