Add a Share to Microsoft Teams button to your SharePoint sites

If you already have Microsoft Teams on your organization, I’m sure you spent most of your day collaborating with your coworkers on it.

SharePoint and Microsoft Teams are tight together in the business environment and with the extension provided in this article you will be able to easily share any page or library directly to any Teams channel.

This project was built an SPFx Application Customizer extension and adds a small button to the left side of your pages, once clicked it opens a popup that allows you to select the Team and the Channel where the page will be shared.

In the animation below you can see how the solution works when applied to SharePoint.

How to install the share button globally

  1. Download and extract the file from here
  2. Open your global app catalog and upload the sppkg file to it
  3. On the deployment popup make sure you check the option Make this solution available to all sites in the organization
  4. Refresh any modern page and you will see the purple button on the left side

How to install the share button per site collection

Note: PnP PowerShell is required to accomplish the steps below, the installation instructions are available here.
  1. Download and extract the file from here
  2. Open your global app catalog and upload the sppkg file to it
  3. On the deployment popup make sure you DON’T check the option Make this solution available to all sites in the organization
  4. Execute the Insatall.ps1 file
  5. Provide the site collection URL where you want to add the Share to MS Teams button
  6. Provide your credentials, once the solution is installed the PowerShell window will close automatically
  7. Refresh any modern page on the site collection and you will see the purple share button

Conclusion and considerations

Using this extension, you will be able to easily share any modern SharePoint page to Microsoft Teams however there are some limitations you might face when using it as described in the official Microsoft documentation, namely:

  • Only the desktop versions of Edge and Chrome are supported.
  • Use of freemium or guest accounts is not supported.
  • The URL being shared cannot require authentication. If it does you can still share it, but the preview will not be created. This means that on SharePoint you will not see the preview of the page being shared.

As always, this solution is available on GitHub fell free to use it and modify it according to your needs.

If you have any suggestion or feedback to improve this solution, please use the commend section. 😊

Download Share to MS Teams
Explore Solution on GitHub

If you have an WordPress blog and want to add the Microsoft Teams button to your site have a look on the plugin I’ve built here.

Design vector created by freepik – www.freepik.com


7 Responses to “Add a Share to Microsoft Teams button to your SharePoint sites”

  1. Erica Toelle

    August 24, 2019

    Hi Joao! This is great! Thank you!

    Do you think it would be possible to add a “share to Teams” button next to list or library items? So the individual items could be shared and discussed?

    I know you can already do this within Teams but I have an organization that is used to SharePoint but slow to adopt Teams. I am hoping something like this could help.

    I will definitely suggest implementing this solution on their news pages!

    And I love the WordPress plugin – will be using that too.

    Reply
    • João Ferreira

      August 24, 2019

      Hi Erica,

      Thanks for your feedback.
      Yes it’s possible I’ll build a different extension to add it to lists and libraries, I’ll let you know once it’s released.

      Have a nice day 🙂

      Reply
    • João Ferreira

      August 26, 2019

      Hi Erica,

      Still work in progress but here is a preview of how it will look like, still need to handle the documents on libraries.

      Let me know if this is what you are looking for.

      I’m thinking about another version that will add the icon next to the item but it will require a custom list on each column, it will be version 3.

      Have a nice day.

      Reply
      • Erica Toelle

        August 26, 2019

        Amazing! This would be perfect – thank you so much!

        Reply
        • João Ferreira

          September 1, 2019

          Hi Erica,

          I just published a new article with a new solution to share documents and list items to Microsoft Teams.
          Hope this helps you on your projects.

          Have a nice day 🙂

          Reply
  2. […] Add a Share to Microsoft Teams button to your SharePoint sites – João Ferreira (BindTuning) […]

    Reply
  3. […] If you are looking for a solution that allows the sharing of pages instead have a look on my previous article here. […]

    Reply

Leave a Reply to João Ferreira


I've been working with Microsoft Technologies over the last ten years, mainly focused on creating collaboration and productivity solutions that drive the adoption of Microsoft Modern Workplace.

%d bloggers like this: