Unable to Send Messages to Teams Channels Using Graph API with Application Permissions

ABHISHEK KUMAR 61 Reputation points
2025-01-13T12:04:06.6666667+00:00

When using the Graph API with Application Permissions, sending messages to Teams channels is resulting in the error below.
User's imageWhile Delegated Permissions work correctly for sending messages, is there another approach that allows sending messages to Teams channels using Application Permissions? Additionally, is it possible to send messages to Teams channels with the O365 Management API?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,750 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,897 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,141 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,254 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Akhil Nasalwai - MSFT 170 Reputation points Microsoft Vendor
    2025-01-13T12:20:59.0233333+00:00

    Hello ABHISHEK KUMAR,

    Thank you for contacting Microsoft!

    As the error message says, application permissions can only be used to import third-party platform messages, not to send messages. To send messages, you must use delegated permissions.

    As per https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http#permissions-for-channel User's image

    You can refer the below mentioned post for reference:

    https://learn.microsoft.com/en-us/answers/questions/2118234/permissions-for-send-message-in-channel-api-result

    Additionally, the O365 Management API doesn't support sending messages to Teams channels directly. However, as a workaround you can use Webhooks and connectors which might help you achieve this functionality.

    Create a webhook in teams - Go to the channel where you want to send messages, click on "Connectors", and add an "incoming webhook".

    Get the webhook URL - copy the URL provided by Teams.

    Send a message using the webhook URL - Use an HTTP post request to send a JSON payload to the webhook URL.

    Hope this helps.

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

    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.