Sharepoint and Teams Integration

Are you looking to integrate SharePoint and Teams at your company?  In this article we'll show you how you can add Microsoft Teams chat right to your SharePoint website allowing you to talk to your SharePoint website visitors right within Teams.

Integrate Sharepoint and MS Teams

By default SharePoint doesn't allow you to add a code snippet to your modern communication website and disables scripting in general.  We'll show you how to extend your SharePoint site to allow inline javascript code snippets so that you can integrate your Microsoft Teams Live Chat with SharePoint.

First, use the SharePoint Framework (SPfx) to extend your SharePoint pages with a Modern Script Editor web part.  This web part enables embedding of a JavaScript code snippet into your pages.  We aren't going to cover this step here, but there is a good guide on GitHub:   https://pnp.github.io/sp-dev-fx-webparts/gettingstarted/

Once you have cloned and packaged the Script Editor web part with Node package manager, you can deploy the script editor to your SharePoint site with the app catalog.  You should see the Modern Script Editor web part as in the screenshot below.

SharePoint Script Editor web part

Now, we'll add the Microsoft Teams Live Chat code snippet to SharePoint.  Simply click the 'Edit markup' button to customize your web part.

SharePoint Modern Script Editor

If you haven't yet signed up for a Live Chat for Microsoft Teams free trial, you can set it up here.  Once you've added the code snippet to your web part, you see the live chat bubble available on your SharePoint site.  

When you start a chat, the chat request is sent directly to your Teams Channel and you can chat with your website visitors right from Microsoft Teams!

That's it.  Your SharePoint is now integrated with Microsoft Teams!