SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1k forks source link

Microsoft Teams Apps Not Working in SharePointOnline #9627

Open ElinKolloen opened 5 months ago

ElinKolloen commented 5 months ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

other (enter in the "Additional environment details" area below)

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

No response

Describe the bug / error

This issue was first reported by twgolds in issue https://github.com/OfficeDev/microsoft-teams-library-js/issues/1851. The Teams developer team by ChetanSharma-msft answered that this should be reported to the SharePoint Team instead so I hopw you can help.

We have created a Teams Application (not using spfx) and need this to be visible in SharePoint page.

The Teams apps have been loaded into the SPO and then we've created Pages based on these applications.

When opening a page that has been created using the Teams App, we simply get a blank page, in the console is an error message: "Uncaught (in promise) SharePoint context is not initialized" -this is occurring within Microsoft code.

Steps to reproduce

Hi,

The steps are quite simple, but many.

Take any Teams App. Confirm that it runs within Teams.

Modify the manifest.json to ensure it contains the "supportedSharePointHosts" attribute, with values "sharePointFullPage"

"configurableTabs": [ { "configurationUrl": "https://myhost.com/config", "canUpdateConfiguration": true, "scopes": [ "team", "groupchat" ] , "supportedSharePointHosts": ["sharePointFullPage", "sharePointWebPart"], "sharePointPreviewImage": "https://myhost.com/img/sharepoint-teams-app.png" } Go to SharePointOnline admin center. Go to the "App Section" Upload your Teams Manifest ( the .zip file, not just the manifest.json ) Deploy the app ( SharePoint should prompt you automatically to do so ) Go to a SharePoint Site within your SharePoint tenant Open a "Site Page" Click the "Gear" on the top right near your profile picture Select "Add a Page" On the "Pages" window that opens up, select the "Apps" tab. Your new App should be listed. Select your App to create a new "Full Paged App" page within SharePoint.

Expected behavior

A blank page in SharePoint instead of the app, and error message in console log

aleksander-bjoru commented 1 month ago

Any update on this issue?