Forum Discussion

Deepak1265's avatar
Deepak1265
Copper Contributor
Nov 27, 2019

How to generate or create chat id of MS teams using Graph API ?

I got the list of chat Id's. I did conversation in MS teams  from  GET  -  https://graph.microsoft.com/beta/me/chats/  using graph API (Graph Explorer)

Is there any way to generate chat Id with the help of user Id with whom I never chat yet.

5 Replies

  • Gousia_Begum's avatar
    Gousia_Begum
    Iron Contributor

    Deepak1265 It is not possible to generate a chat id for the chat that never happened. Could you please elaborate more on your scenario what exactly you are trying to achieve?

    • Deepak1265's avatar
      Deepak1265
      Copper Contributor

      Gousia_Begum 

      I want to chat with a new user. with whom I never chat before

      So that I want to send a message by using graph API

       

       

      POST -  https://graph.microsoft.com/beta/me/chats/  

      Request Body   - {

                                   "body": {
                                                   "content": " message "
                                                 }
                                  }

       

       for that, I need a chat Id

       

Resources