Share via

Howto bypass the "Import-only" restriction for Application permissions, or is a Service Account with Delegated permissions

Gilkey Nabil 85 Reputation points
2026-03-05T13:58:15.72+00:00

I’m building a backend service to automate status updates in a Teams channel, but I’m hitting a consistent 403 Forbidden error when trying to POST a chatMessage. My app is registered in Entra ID with ChannelMessage.Send and Group.ReadWrite.All Application permissions (admin consented), and I'm successfully getting an access token via the Client Credentials flow.

Curiously, I can read messages fine, but the same app-only token fails the moment I try to send one.

Microsoft 365 and Office | Development | Office JavaScript API
0 comments No comments
{count} votes

Answer accepted by question author
  1. Steven-N 21,805 Reputation points Microsoft External Staff Moderator
    2026-03-05T14:45:01.74+00:00

    Hi Gilkey Nabil

    Thank you for reaching out to Microsoft Q&A forum.

    As far as I know, when calling POST /teams/{team-id}/channels/{channel-id}/messages is expected when you use an app-only (client credentials) access token for regular channel posting. Microsoft Graph supports sending channel messages in normal (non-migration) scenarios using delegated permissions (for example, ChannelMessage.Send), but application permissions for posting messages are restricted to migration/import scenarios

    In this situation, you can try two options below to see if it can help you:

    1. Use delegated authentication for normal “status update” posting: If your goal is to post new channel messages as part of a business process (not migration/import), use a delegated flow so the request is made in the context of a signed-in user, and grant the delegated permission ChannelMessage.Send (least privileged) as documented for this API.
    2. Use application-only only if you are truly doing migration/import: If your scenario is importing historical messages into Teams, the application permission path is tied to migration/import usage and is not intended for standard operational notifications.

    Hope my answer will help you. For any further concern, feel free to let me know in the comment section.


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

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

    0 comments No comments

0 additional answers

Sort by: Most 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.