Unable to post message to Microsoft teams channel using Graph API

BASIL VARGHESE 1 Reputation point
2021-11-12T06:06:08.927+00:00

showing error

{"Code: Unauthorized\r\nMessage: Unauthorized\r\nInner error:\r\n\tAdditionalData:\r\n\tdate: 2021-11-12T06:05:07\r\n\trequest-id: acb96a21-f65d-4718-bf59-f42eeadedf72\r\n\tclient-request-id: acb96a21-f65d-4718-bf59-f42eeadedf72\r\nClientRequestId: acb96a21-f65d-4718-bf59-f42eeadedf72\r\n"}

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,896 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,566 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hunaid Hanfee-MSFT 981 Reputation points
    2021-11-15T16:22:24.807+00:00

    Hello @BASIL VARGHESE ,
    It only allows to send message in channel when the team is in migration mode when using application permissions. Please see this doc to understand more - Import external messages to teams . It is also mention in the doc -
    149491-image.png.
    You can use this API only with delegated permissions as of now.

    Thanks,

    Hunaid L Hanfee


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.