How to fix the authentication issues with personal apps using SharePoint pages
SharePoint has been out there forever and I’m sure you have a lot of content on it that you would love to start seeing on Microsoft Teams.
Vesa Juvonen did an amazing video covering a typical scenario of how SharePoint and Teams can be integrated without writing code but unfortunately the solution fails when used on the desktop Microsoft Teams client.
The with this solution is that the SharePoint page is not doing the authentication and the user ends up in a blank page, as shown in the following image.
In order to make it work you will need to modify it either by editing the manifest.json or by adding extra properties to it using he app studio.
The modifications made to the solution are documented here and you should be able to use them without any problem, in the following image you have highlighted all the necessary additions to the manifest.
Since the original video describe the process as a no code solution I’m providing the steps
- Start by opening the app on the app studio
- Edit your tabs and modify the content url to the following format
The link to the actual page is added as a relative URL after the query string dest.
- On the domains and permissions add the following domains manually by clicking in the Add button
*.login.microsoftonline.com *.sharepoint.com *.sharepoint-df.com spoppe-a.akamaihd.net spoprod-a.akamaihd.net resourceseng.blob.core.windows.net msft.spoppe.com
- On the domains and permissions scroll down and add the following value to the AAD App-ID field
This app already exists on your azure and is used also by the SPFx web parts on Microsoft Teams
- On the domain permission add the URL to your SharePoint portal to the Single-Sign-On filed
- Save the app and install it, the following animation demonstrates how it will work now when used on the Microsoft Teams desktop client
Leave the website url with the default SharePoint link
February 18, 2020
[…] How to fix the authentication issues with personal apps using SharePoint pages | João Ferreira (Beezy Inc) […]
October 27, 2020
Thank you for the post. Is it possible to provide open an Azure AD authenticated web sites in the personal app tab just like the SharePoint site?
October 28, 2020
Yes it’s possible as long as your website handles the authentication, this link might be useful if you are looking to implement a solution outside of SharePoint.
Have a nice day 🙂
April 8, 2021
how it should work if I would also want to have a message extension with SSO in the same app? I would need to use different AAD App-ID and resource for my bot SSO. Is there a workaround for this or I would need to use different apps for tabs with SharePoint pages SSO and different for message extensions?
May 18, 2021
I think the answer to what you are looking for is here in this video with a step by step instructions on how to create a messaging extension using SPFx
Hope this helps