I have a SharePoint Page.

My requirement is that on click of link or a button I have to open Microsoft Teams and should be able to chat with a single user and also create a chat group for multiple users.

First of all, how to open Teams on click of a button?

Please help with the above query.

Thank you. :)

  • Do you just want a simple link which opens up a new chat window in teams? – harshal gite Sep 30 '19 at 6:23
  • I'm sorry, i didn't explain it correctly. For example, there are two persons like A & B. When i click the link in sharepoint page, it should Automatically create a Group for these two people, so that i can have a conversation with them. Please help : ) – user85801 Sep 30 '19 at 9:31
  • Where will these users be? I mean, how will you indentify these are the 2 users with whom chat window is to be opened? Is there a specific group? – harshal gite Sep 30 '19 at 9:59
  • The thing is, there is no group. The two users are dynamic , we can be able to add few more users if we want. i just told two users for instance. Normally, we'll have a group right in teams. so, a group should be created automatically on a button click(for two users/multiple users) i see that, we can use Graph Api. but i'm not sure. Any suggestion on it, plz :) – user85801 Sep 30 '19 at 10:48
  • But how will the script or application know which users are to be added? Will the user names be on the page? – harshal gite Sep 30 '19 at 10:50

If you simply need a button which takes you to the chat window in teams (web apps - provided that you are logged into teams), then you can just add a "Button" web part on your site page (modern page) and then bind the following link to the button click by editing the web part. Clicking on that button will open the teams web apps chat window.


enter image description here

enter image description here

As per your requirement, you can use the url in the below format:


where <user1> & <user2> are email addresses of the desired users.

For example,

To ask whether to open in app or web use the below format:


To force open the link in teams web app, use the below format:


For more information please check this documentation.


For team members, in SharePoint Online Modern Sites left navigation, there is a link called Teams. Click on it will open Teams in browser. You can also create new teams with the teams banner notification in the bottom.

For more information about the integration between MS teams and SharePoint Online, you can check this thread:

SharePoint integrations in MS Teams.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.