Add Microsoft Teams chats to SharePoint

In today’s work environment, we’ve all witnessed the transformation of how we get things done. Work is all about collaboration, flexibility, and staying connected. Chances are you’ve heard that technology should be where you work, seamlessly integrated into your daily routine.

Microsoft understands this need and has made great improvements in that direction. While most applications were brought into Microsoft Teams, there is another exciting perspective worth exploring: bringing Microsoft Teams to your SharePoint intranet.

Microsoft Teams chat in SharePoint sites

In this blog post, I’m showing you how to do just that. I’ll guide you through the process of integrating Microsoft Teams chats into your SharePoint intranet, including a custom solution that I developed for this purpose.

For a while, I’ve had the idea of creating an integrated chat for SharePoint using Microsoft Teams, like the one found on LinkedIn. However, this requires a substantial amount of work, and writing a Microsoft Teams custom application solely for this purpose seemed too much.

I’ve had this project idea bouncing around in my head for a while. But one day, as I was casually scrolling through the latest Microsoft Teams updates, I stumbled upon a new feature that makes links shared in Teams conversations open right next to the related website, giving you a better feel for the context.

Microsoft Teams chat in SharePoint sites

This was the perfect solution to implement the Microsoft Teams chat inside SharePoint and after exploring it a bit I concluded that it was viable and built the extension you are now reading about in this post.

How to add Microsoft Teams chats to SharePoint sites

If you are willing to know more about the implementation details have a look to here where I explain how things were made.

Before we jump into the details of the installation process make sure you download the sppkg package from here.

  1. Extract the zip file, inside you will find a sppkg to install the solution in your SharePoint tenant
  2. Open the SharePoint app catalog and upload the chat-embedded.sppkg
  3. Check the option Enable this app and it to all sites, this will make the app available in all modern SharePoint site for all the users
    Microsoft Teams chat in SharePoint sites
  4. Click Enable app
  5. Click Go to API access page, this step is required to see the profile picture of the user in the extension
  6. Select the Read permission from the chat-embedded-client-side-solution and click Approve
    Microsoft Teams chat in SharePoint sites

Navigate to any page in your organization and you will see the extension at the bottom of the page. If you are not yet authenticated in Microsoft Teams in the browser you will have to do it the first time you use the extension, after it you will be able to simply have conversations from any SharePoint page as shown in the following animation.

Note this extension takes advantage of an integration made by Microsoft and it automatically gets the color of the theme from your operating system, so it automatically chooses the light or dark themes.

If you want to see it in action have a look to the video below, and make sure you follow me on social media and YouTube so you don’t miss future updates and cool integrations for your SharePoint intranet.

Download Solution
Explore on GitHub


8 Responses to “Add Microsoft Teams chats to SharePoint”

  1. Joao Almeida

    October 27, 2023

    Hi Joao, I published your solution in a tenant, but the all users appear with “Unknown User” (and I did give permissions to graph api) Did you know what happens?

    Thanks for your solution!!

    Reply
    • João Ferreira

      November 16, 2023

      Do you see the unknown user in the chat window or in the component to open it?

      Reply
  2. Amazing webpart

    October 31, 2023

    I downloaded the sppkg file and uploaded it in my app catalogue but it shows empty why you expand the team chat , it does not fetch the chats it just shows empty when you expand it. and i have already user.read graph api approved didn’t see any other api because i am making use of some other webpart that i had to approve user.read api. i tried to repackage the file to get new sppkg but it didn’t repackage , if you can assist me i will be grateful.

    Reply
    • João Ferreira

      November 15, 2023

      If you are not using Edge make sure you open Teams in EDGE in the browser and then refresh the SharePoint page again.
      I had a Chrome user reporting that it only worked after Teams was launched in EDGE for the first time, once he did it, it started working in all browsers.

      Reply
  3. vishal

    November 6, 2023

    I have used your code facing one issued at bottom placeholder show error message object is possibly undefined

    Reply
  4. Drena

    November 15, 2023

    Thank you so much for creating this. I’m not able to get it to work though. I am using Edge and have opened Teams in the browser and refreshed. The Team app just doesn’t show up on the page. Is there anything I need to turn on in the tenant to make it work?

    Reply
    • João Ferreira

      November 16, 2023

      Have you installed it in the global app catalog and made it enabled to all the modern SharePoint sites?
      If that is the case, check the browser console and let me know if you see any error related to the extension.

      Reply

Leave a Reply


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: