want to send a message in teams using the Graph APIs

Microsoft Q & A 381 Reputation points
2023-08-01T19:48:39.7933333+00:00

I want to access Microsoft Graph APIs using that I want to send a message in teams using the APIs ,

Can you help me what and how to provide the application API Permission to my Azure AD app , as I m not able to do this.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,515 questions
{count} votes

2 answers

Sort by: Most helpful
  1. CarlZhao-MSFT 46,326 Reputation points
    2023-08-02T09:01:52.7866667+00:00

    Hi @Microsoft Q & A

    According to the doc:

    If you are trying to send a message in a team channel, then grant your application the ChannelMessage.Send delegation permission and call the POST /teams/{team-id}/channels/{channel-id}/messages API.

    If you're trying to send a message in a chat, then grant your application the ChatMessage.Send delegated permission and call the POST /chats/{chat-id}/messages API.

    Note that you need to use the delegated authentication flow (auth code flow or ROPC flow) to obtain tokens for the above API endpoints.

    Hope this helps.

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


  2. Seoshahzaib 0 Reputation points
    2023-08-09T14:48:12.45+00:00

    Is afforded Desiserials site on MS

    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.