Forum Discussion

Fredeids's avatar
Fredeids
Copper Contributor
Mar 12, 2025

Showing intranet sites (Sharepoint) inside teams client

Hi, 

Im a rookie when it comes to teams-app development, but our organization has a need for custom apps showing different Sharepoint pages to different users. Originally we intended to use Viva Connections, but as of now, it does not seem to fit our needs because we have at least 4 different experiences (School A student, School A teacher, School B student and School B teacher), and we dont want either of them to show the dashboard (we want every user to see its respective Sharepoint site directly because we find it easier to display relevant information here). 

I have suggested to one of our IT-admins that we disable the default landing page from Sharepoint Management Shell, but they say this will lead to everyone seeing the same default page (tenant-wide). We dont want that, we want all the different types of users to see their respective home site, according to the viva experiences we set up, but without having to load the viva-dashboard first. It may seem mundane, but our (young) users struggle to find our "homesite" this way. 

As a workaround i figured we created teams custom apps through the developer portal, showing the Sharepoint sites directly. This also allows us to pin both the teacher and student portal for our teachers/staff, which is really handy for easy access. 

When i created the apps, I added "?app=portals" behind the web content URL in the manifest/app developer portal, so that the home site navigation bar is showing inside the teams app. End goal being they can use the home sites and every sub-site directly in the custom app inside teams. 

This worked like a charm for a couple of days, but now whenever we use the navigation bar inside the app, it redirects the user to external browser. The frustrating part is that some of my navigation bar links works inside the teams client, but most do not, and sometimes it takes a minute after i start the application where everything works the way i want, where i can navigate the home sites inside teams, but then the teams app suddenly remembers to kick me out into default web browser... Same happens on phone.

My problem:

  • My custom teams app (personal tab), redirects user to external browser when clicking links from navigation bar, even though they have the same ourtentant.sharepoint.com domain. 

My goals: 

  • I want to show SharePoint site content inside teams client, without being redirected to browser
  • I want the SharePoint content to be as easy to reach as possible, with the fewest amount of clicks for the 4 different user groups when they open Teams client. 

Any tips as to how i can reach our goals here? Either through custom apps or through viva?

  • Hello Fredeids

    1. The redirection to an external browser happens because some SharePoint links are not optimized for embedding in Teams. This behavior is controlled by SharePoint's security policies and Teams' webview limitations.

    • Solution: Ensure that all links in your navigation bar are "Teams-friendly." Use the ?web=1 query parameter in your SharePoint URLs to force them to open in Teams. For example:This parameter ensures that the content is rendered in the Teams webview instead of redirecting to the browser.
      https://yourtenant.sharepoint.com/sites/YourSite?web=1
    • Manifest Configuration: Double-check your app manifest to ensure the webContentUrl is correctly set and includes the ?web=1 or ?app=portals parameter.
      Example: "contentUrl": "https://yourtenant.sharepoint.com/sites/YourSite?app=portals"
    • Navigation Links: For links in the navigation bar, ensure they are relative URLs or explicitly include the ?web=1 parameter.

     

    2.Viva connection alternatives

    • Viva Connections is designed to provide a seamless SharePoint experience in Teams. However, it currently supports only one default landing page per tenant.
    • Workaround: Instead of using Viva Connections for all users, create separate Viva Connections apps for each user group (e.g., School A Student, School A Teacher). Each app can point to a different SharePoint home site. This requires creating multiple Viva Connections manifests and deploying them as separate Teams apps.

    Document Link-
    1.Integrate Teams Tab to SharePoint - Teams | Microsoft Learn
    2.Overview: Viva Connections | Microsoft Learn

  • Fredeids

    Thank you for your inquiry about your Teams app development issue!

    We are checking the issue. We will get back to you shortly.

Resources