Is there any way to generate chat Id of MS teams using graph API ?

%3CLINGO-SUB%20id%3D%22lingo-sub-1035759%22%20slang%3D%22en-US%22%3EIs%20there%20any%20way%20to%20generate%20chat%20Id%20of%20MS%20teams%20using%20graph%20API%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1035759%22%20slang%3D%22en-US%22%3E%3CP%3EI%20got%20the%20list%20of%20chat%20Id's.%20I%20did%20a%20conversation%20in%20MS%20teams%20from%20GET%26nbsp%3B%20-%26nbsp%3B%26nbsp%3B%3CA%20title%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fme%2Fchats%2F%22%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fme%2Fchats%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fme%2Fchats%2F%3C%2FA%3E%26nbsp%3B%20using%20graph%20API%20(Graph%20Explorer).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20chat%20with%20a%20new%20user.%20with%20whom%20I%20never%20chat%20before%3C%2FP%3E%3CP%3Ebut%20I%20want%20to%20send%20a%20message%20by%20using%20graph%20API%26nbsp%3Bfor%20that%2C%20I%20need%20a%20chat%20Id%3C%2FP%3E%3CP%3EPOST%20-%26nbsp%3B%26nbsp%3B%3CA%20title%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fme%2Fchats%2F%22%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fme%2Fchats%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FUSER_ID%2Fchats%2FCHAT_ID%2Fmessages%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3ERequest%20Body%26nbsp%3B%20%26nbsp%3B-%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22body%22%3A%20%7B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22content%22%3A%20%22%20your%20message%20%22%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7D%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20that%20I%20want%20to%20generate%20chat%20id%20with%20respect%20to%20new%20user%20with%20Whom%20I%20never%20chat%20before.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20generate%20chat%20Id%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1035759%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConversations%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraphAPI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1043380%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20any%20way%20to%20generate%20chat%20Id%20of%20MS%20teams%20using%20graph%20API%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1043380%22%20slang%3D%22en-US%22%3EWhen%20I%20was%20playing%20with%20meetings%20I%20was%20able%20to%20add%20the%20recipient%20to%20meeting%20as%20participant%20and%20thus%20use%20chat%20message.%20However%2C%20I%20haven't%20tried%20the%20scenario%20you%20describe%20so%20I%20don't%20have%20an%20answer.%20So%20I%20just%20drop%20this%20to%20follow%20up%20for%20other%20answers%20and%20hope%20for%20the%20solution%20myself%20too%20%3A)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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

 

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

but I want to send a message by using graph API for that, I need a chat Id

POST -  https://graph.microsoft.com/beta/USER_ID/chats/CHAT_ID/messages  

Request Body   - {

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

 

So that I want to generate chat id with respect to new user with Whom I never chat before.

 

Is there any way to generate chat Id?

 

1 Reply
Highlighted
When I was playing with meetings I was able to add the recipient to meeting as participant and thus use chat message. However, I haven't tried the scenario you describe so I don't have an answer. So I just drop this to follow up for other answers and hope for the solution myself too :)