Posting Replies to Teams Channel Messages

Glenn Maxwell 14,166 Reputation points
2026-08-08T05:13:46.16+00:00

Hi All,

One of our users is working on an integration between an in-house tool and Microsoft Teams. As part of this integration, the requirement is to add comments/replies to existing Teams channel posts from the in-house tool using the Microsoft Graph API. However, the user is encountering the following error when attempting to POST a reply to an existing Teams channel message. Could you please help us understand whether any required Microsoft Graph API permissions are missing?..

Microsoft Graph API:

https://graph.microsoft.com/v1.0/teams/s

Error:
{
  "error": {
    "code": "Unauthorized",
    "message": "Message POST is allowed in application-only context only for import purposes. Refer to https://docs.microsoft.com/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams for more details.",
    "innerError": {
      "date": "2026-08-05T11:24:37",
      "request-id": "",
      "client-request-id": "
    }
  }
}

The API call is being made from the in-house tool using Microsoft Graph. Could you please advise on the required Microsoft Graph API permissions and the recommended authentication approach for this scenario? Also, is there a Microsoft-supported way to post replies to existing Teams channel messages using application permissions?..

Microsoft Teams | Microsoft Teams for business | Teams and channels | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Alina Le 4,445 Reputation points Independent Advisor
    2026-08-08T06:29:53.4866667+00:00

    Hello @Glenn Maxwell

    The error returned by Microsoft Graph provides a strong indication of the underlying issue:

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

    This error indicates that the request is being executed using an application-only access token. According to Microsoft's documented behavior for Teams messaging APIs, posting replies to existing Teams channel messages is supported in a delegated user context, while application permissions are reserved for Teams migration and import scenarios.

    Based on the error and the documented permission model, the issue does not appear to be related to a missing Graph permission. Instead, the request is being rejected because the API operation is being performed using an authentication model that is not supported for this scenario. Microsoft Graph is explicitly identifying the request as an application-only request and returning an authorization error before the operation can be completed.

    The next step would be to verify whether the integration is currently using an application-only token (Client Credentials Flow). If it is, switching to a delegated user token is likely required, as Microsoft supports replying to Teams channel messages through delegated permissions (such as ChannelMessage.Send) rather than standard application permissions.

    Besides, I also recommend posting the detailed use case on the Microsoft Graph Community Forum. The forum is reviewed daily by specialists who share practical experiences, known cases, and recommended approaches that may help identify alternative or advanced solutions.

    333

    In this case, broadening the discussion may help you reach a wider audience and potentially receive creative or alternative ideas from other users facing the same challenge. This also increases the overall chance of discovering a suitable solution.

    If you receive any updates or find a viable approach, it would be greatly appreciated if you could share it here as well to help others who may be experiencing the same issue.

    Finally, I have found following Microsoft documentations for your reference:

    Kind regards,


    If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-08-08T05:14:07.9566667+00:00

    The error indicates the request is using application permissions. For replying to an existing Teams channel message, that is not supported for normal posting.

    For this API:

    POST /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies

    The supported permissions are:

    • Delegated (work or school account): ChannelMessage.Send least privilege, or Group.ReadWrite.All
    • Delegated (personal Microsoft account): Not supported
    • Application: Teamwork.Migrate.All only for migration scenarios

    Key point:

    • Application permissions are only supported for migration/import scenarios for channel message replies.
    • For a normal in-house integration that posts replies visible in Teams, the supported approach is delegated authentication with a signed-in work or school user and ChannelMessage.Send.

    Recommended authentication approach:

    1. Acquire a delegated access token for a signed-in Microsoft Entra work or school user.
    2. Request ChannelMessage.Send as the least-privileged permission.
    3. Call: POST /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies
    4. Include a JSON body with at least the body property.
    5. Expect 201 Created on success.

    Minimum request requirements:

    • Header: Authorization: Bearer {token}
    • Body: a chatMessage payload where body is required

    There is no Microsoft-supported way in the provided documentation to post normal replies to existing Teams channel messages using application permissions. The only documented application-permission path is message migration/import using Teamwork.Migrate.All.

    Also note that Microsoft recommends not using the standard create message flow for data migration; migration scenarios should use the import messages flow instead.

    Example conclusion for this case:

    • If the tool is using client credentials/app-only, that explains the error.
    • To post a regular reply, switch to delegated auth and grant ChannelMessage.Send.
    • If the requirement is truly app-only posting, the documented support is limited to migration/import, not regular interactive channel replies.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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