How to Fix Intermittent 401 Errors in a SharePoint Tab in Microsoft Teams
Question details
Users experience intermittent 401 Unauthorized errors and unexpected sign-in prompts when attempting to view a SharePoint tab embedded in Microsoft Teams.

- Product
- Microsoft Teams
- Device & OS
- not provided
- Scenario
- Accessing embedded SharePoint pages or document libraries through a static tab within a Microsoft Teams channel.
- Observed behavior
- The embedded SharePoint page fails to consistently inherit the Teams authentication session, leading to 401 Unauthorized errors and repeated sign-in loops inside the tab iframe.
Verify that you have the appropriate permissions for both the Microsoft Teams channel and the corresponding SharePoint site, and ensure the SharePoint URL uses HTTPS.
Use the First-Party SharePoint Integration
Instead of manually embedding a SharePoint URL as a website tab, use the native Microsoft Teams SharePoint app to automatically handle authentication context.
Teams does not automatically transfer a Teams login into an arbitrary SharePoint page embedded in an iframe. Using the supported first-party integration guarantees that the authentication session is properly managed.
Navigate to the specific Microsoft Teams channel where you want the SharePoint content to appear.
Click the '+' (Add a tab) button located at the top of the channel window.
Search for and select the official 'SharePoint' app from the list of available tab applications.
Select the specific SharePoint page, list, or document library you want to display, then click 'Save'.

Configure Tab SSO for Custom Web Apps
If you are developing a custom Teams tab that interacts with SharePoint or Microsoft Graph, you must explicitly configure Single Sign-On (SSO) using the Teams authentication APIs.
Verify App Manifest Domains and HTTPS
Check your custom Teams app manifest to ensure all required URLs are secure and that the domain is correctly whitelisted.
Looking for a Lightweight Office Suite? Try WPS Office
While WPS Office does not directly resolve Microsoft Teams server configuration issues, it offers a fast, free, and highly compatible alternative to Microsoft Office for creating, editing, and sharing your documents seamlessly without complex enterprise setups.
- 1. Download the installer: Visit the official WPS Office website to download the free, lightweight installer package.
- 2. Install WPS Office: Run the setup file and follow the standard on-screen instructions to install the suite on your device.
- 3. Start creating: Launch WPS Office to immediately open your existing documents or start creating new ones seamlessly.

Frequently Asked Questions
Why does embedding a SharePoint URL directly cause intermittent 401 errors?
A direct SharePoint URL relies on an iframe within the Teams desktop client or web app. Because of strict browser privacy settings, cross-site cookie restrictions, and token expiration policies, the iframe often fails to inherit the user's active Teams authentication session, leading to unauthorized access errors.
Can I use Teams Tab SSO for a standard SharePoint site?
No, Teams Tab SSO is specifically designed for custom web applications that you build and control. It requires configuring specific app manifest parameters like webApplicationInfo and utilizing Teams authentication APIs, which cannot be natively injected into standard out-of-the-box SharePoint pages.
What is the most reliable way to display a SharePoint document library in Teams?
The most reliable method is to use the official, first-party SharePoint integration. Simply click the 'Add a tab' (+) button in your Teams channel, select the 'SharePoint' app, and choose the library. This method inherently handles SSO and token management properly.




