Publishing Content From Another SharePoint Site to Teams

A Team is Tightly Connected to its SharePoint Site

Last year, I wrote an article about the ways you can publish SharePoint news items to Teams. One of the methods is to use the SharePoint tab to link to the News page in the site belonging to the team. This works well and I called it the “nicest approach to publish news into Teams.”

The downside is that the SharePoint tab only supports the publication of pages or lists from the site belonging to the team (Figure 1). This is fine if you want to publish news to something like an org-wide team (for tenants with fewer than 5,000 accounts), but it’s problematic if you want to bring content like a news item with important information from another site into a team.

What can be published with the Teams SharePoint tab
Figure 1: What can be published with the Teams SharePoint tab

The Workaround

If you examine news items, you’ll find that each item is a separate page. The workaround to bring content from a different site into a team is to publish the page using the website tab. The website tab supports the publication of content from any URL, assuming that the reader has access to that content. In the case of a SharePoint page, we need a URL that tells Teams to fetch and display the content.

The first thing to do is to open the page we want to display in a browser and copy its URL. For example:

https://office365itpros.sharepoint.com/sites/BlogsAndProjects/SitePages/Microsoft-Launches-New-Teams-Exploratory-Experience.aspx

This URL is enough for SharePoint to render the content, but Teams is a different context and the URL we need is slightly different. The amended format is:

https://office365itpros.sharepoint.com/sites/BlogsAndProjects/_layouts/15/teamslogon.aspx?spfx=true&dest=/sites/BlogsAndProjects/SitePages/Microsoft-Launches-New-Teams-Exploratory-Experience.aspx

The important bit is the inclusion of a command to force Teams to authenticate with SharePoint before displaying the page.

Working Example

Figure 2 shows a news item created and published in SharePoint as viewed through the browser interface. The first thing to do is to copy the URL for the item from the browser and adjust it as described above.

 News item published and viewed in SharePoint
Figure 2: News item published and viewed in SharePoint

Next, go to Teams and select the channel in the team you want the content to appear. Click Add a tab and select the website tab. Input a unique name for the tab and the amended URL for the content you want to display (Figure 3).

Adding a URL to a Website tab
Figure 3: Adding a URL to a Website tab

After the tab is created, it should display the content. As you can see from Figure 4, the formatting and layout is rendered properly by the tab.

Teams displays content from a different SharePoint site
Figure 4: Teams displays content from a different SharePoint site

Avoid Spinning Wheels

Some people have great success with this workaround, others find that it leads to spinning wheels and nothing being displayed. If you’re in the latter category, consider exploring the solution proposed by Yannick Reekmans. It’s a nice example of thinking outside the box to fix a problem.


Need more information about how Teams and SharePoint Online work together? Peruse the chapters in the Office 365 for IT Pros eBook to get a better understanding of how these important parts of Office 365 work together.

Advertisements

One Reply to “Publishing Content From Another SharePoint Site to Teams”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.