send channel message is not working with application permissions

Lee Gu 5 Reputation points

i am getting "

Message POST is allowed in application-only context only for import purposes

teams api.PNG"

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
8,632 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,900 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
18,577 questions
{count} votes

3 answers

Sort by: Most helpful
  1. HarmeetSingh7172 4,886 Reputation points

    Hello @Lee Gu

    Thanks for reaching out!

    As per the documentation, application permissions are supported only for migration purposes. For this, your team and channel both must be created in a migrated state. However, you can use this graph API in a delegated context (with signed-in user).

    Reference: Send ChatMessage in Channel

    Hope this helps.

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

  2. Phani Kumar Venigalla 0 Reputation points


    What is the API that can use for sending teams channel message from JAVA application.

    We are looking for application level access. Can we use graph API to send channel messages?



    0 comments No comments

  3. Notificações 30 Reputation points

    Hello, i have the same problem, someone knows how solve this?

    I'm trying to send a message in a private chat, I can do it through the demo api, but not on my system

    0 comments No comments