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
- Download and extract the file from here
- Open your global app catalog and upload the sppkg file to it
- On the deployment popup make sure you check the option Make this solution available to all sites in the organization
- Refresh any modern page and you will see the purple button on the left side
How to install the share button per site collection
- Download and extract the file from here
- Open your global app catalog and upload the sppkg file to it
- On the deployment popup make sure you DON’T check the option Make this solution available to all sites in the organization
- Execute the Insatall.ps1 file
- Provide the site collection URL where you want to add the Share to MS Teams button
- Provide your credentials, once the solution is installed the PowerShell window will close automatically
- 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
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.
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 🙂
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.
August 26, 2019
Amazing! This would be perfect – thank you so much!
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 🙂
August 27, 2019
[…] Add a Share to Microsoft Teams button to your SharePoint sites – João Ferreira (BindTuning) […]
September 1, 2019
[…] If you are looking for a solution that allows the sharing of pages instead have a look on my previous article here. […]