Mar 12 2019 08:13 PM
Mar 12 2019 08:13 PM
We now have an App in Teams for our company Intranet content so people can work in Teams whilst accessing useful content from the Intranet using the Teams App Studio.
One of the challenges was getting the tabs to SharePoint pages to work. If you add a Tab and paste in the SharePoint page URL, nothing shows in Teams. To make this work, you need to create a URL in the following format:
The key is in the TeamsLogon.aspx and the spfx=true.
I also created a BOT using QnAMaker and registered this with the Bot Framework so we can also ask common questions related to content in the Intranet without needing to browse or search for it.
Mar 20 2019 02:49 AM
@Alan Marshall Thanks that looks really interesting. However I'm afraid I haven't had much success when I tried to emulate it. I used the following URL for the personal tab content: -
However, when I tried to run it in the Teams app, I get a neverending wheel being displayed inside the Teams: -
Is there anything obvious I have done wrong or any prerequisites I might have missed!
Mar 20 2019 12:29 PM
Did you replace [TenantName] with you tenant, copy this from the page url.
You need to also replace home site location and Home11 with your page name.
Best option is to navigate to the page in SharePoint and copy the URL and then use an online URL encoder and replace the dest= value with the encoded url. If you search in Bing for "url encoder" it shows an entry box in the window.
Also make sure you have added the [TenantName].sharepoint.com to the domains list for your App studio manifest.
Mar 21 2019 02:46 AM
@Alan Marshall Hi Alan. Thanks for getting back to me. I did use the tenancy name and Intranet Site name, (I substituted them with square brackets for the post). I have double checked: -
...and I am still getting the same result.
Interestingly I am able to use that link full link inside: -
So I am still confused by why it isn't working. It would be interesting to get feedback from some Microsoft people as I would have thought embedding a intranet in Teams as a tab would be a relatively common use case. @Mark Kashman @Chris McNulty @Paul Cannon @Christopher Bryan
Mar 21 2019 01:42 PM
Now I'm getting the same as you. It was working perfectly which is why I posted this tip so other people didn't encounter the same issue.
Mar 21 2019 05:39 PM
This only seems to work if you have previously visited a tab in a channel that links to a page in the same tenant.
I signed out of Teams and back in to find the tabs didn't work. I then went to a team that has a tab pointing to a page in SharePoint in the same tenant and then went back to the app and it works, it must be storing a cookie somewhere that only gets generated when you use the tab url link.
Jul 10 2019 01:45 AM
I also have the same problem that I need to authenticate to add a tab with important learning content for a client I am working for at the moment.
I've created a personal app with tabs to show content from different sharepoint locations. But if the user never created a cookie it won't work for all when they first open the app.
Microsoft should do something about this. There are many companies who are using only Teams as their central communication plattform. It should be easier to display SP content in tabs from all over the intranet. Without this feature it is near impossible to build such an app.
I hope some Microsoft expert will answer to this thread.
Jul 10 2019 01:42 PM
@robby_o365 What needs to happen is a silent SSO using the ADAL.js hosted in your Azure tenant to first perform a sign in as the user which gets the cookie and then redirect to the original page request. This is what the Teamslogon.aspx page is doing so a version of that you can host in your AzureAD subscription secured with Azure AD auth would potential do the trick. I'm not a dev so don't know how to correctly build this page.
Jul 11 2019 01:38 AM
I know, but MS should make it easier to embed a SharePoint page into a static tab. I am allready authenticated in Teams. There should be a parameter to set a tab to pass through for SSO when an internal SharePoint ressource is called.
Feb 16 2020 11:04 PM
Feb 17 2020 03:25 AM
@Alan Marshall should it be able to translate this as well, to have a direct link to your OneDrive?:
Sadly it's not working. Any advice perhaps
Same goes if you want to embed https://portal.office.com in a tab.
Feb 18 2020 02:18 AM
What's even more strange is that when I test the app tabs with my admin account I see the SharePoint pages. Only when I distribute the app to the users they do not and cannot open the pages. When I use you additional TeamsLogon.aspx in the url I also get the same page loading image in a loop and if I then try to access the page as an admin I get 404 page not found. So I'm going to see if there is an authorization issue which is blocking the pages to show for the users.
Thanks for the information anyway.
Feb 18 2020 10:37 AM
Feb 19 2020 03:29 AM
I tried to validate this but I had no success, I followed all the steps on the video and in the website but when I open the app it just keep loading and I get the following errors in console:
Anyone get success on this?
Feb 19 2020 06:45 PM
Feb 19 2020 11:10 PM
Now is working!
I miswrote one of the domains and the resource URL.
I put here the validDomains for just copy/paste it:
"validDomains": [ "*.login.microsoftonline.com", "*.sharepoint.com", "*.sharepoint-df.com", "spoppe-a.akamaihd.net", "spoprod-a.akamaihd.net", "resourceseng.blob.core.windows.net", "msft.spoppe.com" ]
Thanks a lot.
Feb 20 2020 01:57 AM - edited Feb 20 2020 01:59 AM
@Alan Marshall got it working as well! Combining the post you sent and this source:
BTW in App Studio you can create the same manifest (by clicking it together), but it will give an error if you add "*.sharepoint.com" to the list of domains. So I just removed this and the app stil works.