Open stevebeauge opened 1 year ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
@stevebeauge - thanks for reporting this one.
If you look at the documentation, the url for the messaging extension should reference teamstaskhostedapp.aspx
page, not teamshostedapp.aspx
.
Could you please modify it and check if that helps?
Thanks @AJIXuMuK.
I fixed the manfiest URL to match the one in the documentation:
"taskInfo": {
"title": "Test compose extension",
"height": "large",
"width": "large",
"url": "https://{teamSiteDomain}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest=/_layouts/15/teamstaskhostedapp.aspx%3Fteams%26personal%26componentId=3249eed9-2f35-4ba0-a3f0-57cac9caccf7%26forceLocale={locale}"
}
But it behaves exactly the same :(
I wonder if it can be related to validDomains
. The few WebViews issues I found (not specific to MS Teams) mention some CORS / CSP issue.
Unless I'm missing something, there's no public documentation related to this configuration. I keep the default ones generated when I try "sync to teams" feature without manual manifest:
"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"
],
Is this list correct?
@stevebeauge - could you by any chance share the app with me that I could test? you can use aterentiev@microsoft.com to privately send it to me.
Published a repro here: https://github.com/stevebeauge/repro-sp-dev-docs-issues-9018
Sorry @stevebeauge for the long delay. It's a bit weird but for some reason I can't even add the app you shared as a message extension (works fine as personal app and notification-only bot). I'm seeing you've opened an issue on Teams side - it's a good decision as it feels like something is wrong there.
For reference: https://github.com/OfficeDev/TeamsFx/issues/9241#issuecomment-1634187050
Seems to be an issue with the {teamSiteDomain}
resolution when neither staticTabs
nor configurableTabs
is present.
However, adding temporary these tabs does not solve the original issue of this issue (not working inside teams mobile)
Hi @AJIXuMuK, would like to confirm with you on this issue https://github.com/OfficeDev/TeamsFx/issues/9241#issuecomment-1634187050. Currently *.sharepoint.com
exists in validDomains
field in both SPFx official doc and auto-generated Teams manifest file (https://learn.microsoft.com/en-us/sharepoint/dev/spfx/deployment-spfx-teams-solutions#automatically-create-the-microsoft-teams-app-manifest-and-package). Since *.sharepoint.com
doesn't pass marketplace validation (https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/appsource/prepare/teams-store-validation-guidelines#external-domains), will you regard this as a bug and update both sides?
@HuihuiWu-Microsoft this issue is not related to validDomains, but to the inability to load SPFX based compose extension on mobile client.
I mentioned the other issue to add context and potential field of investigation.
@stevebeauge Yes, I know this is not totally the same issue as https://github.com/OfficeDev/TeamsFx/issues/9241#issuecomment-1634187050 but they might be potentially related.
But the validDomains issue is valid and SPFx side may also need to update if this is a bug. Or I can open another issue to confirm the validDomains issue.
Hi @AJIXuMuK, would like to confirm with you on this issue OfficeDev/TeamsFx#9241 (comment). Currently
*.sharepoint.com
exists invalidDomains
field in both SPFx official doc and auto-generated Teams manifest file (https://learn.microsoft.com/en-us/sharepoint/dev/spfx/deployment-spfx-teams-solutions#automatically-create-the-microsoft-teams-app-manifest-and-package). Since*.sharepoint.com
doesn't pass marketplace validation (https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/appsource/prepare/teams-store-validation-guidelines#external-domains), will you regard this as a bug and update both sides?
This is an issue with marketplace validation, not the manifest.
We can't remove *.sharepoint.com
from validDomains
.
@GrahamMcMynn - please, correct me if I'm wrong.
@AJIXuMuK In that case, if user scaffold a SPFx solution and deploy to Teams with automatically generated app package(https://learn.microsoft.com/en-us/sharepoint/dev/spfx/deployment-spfx-teams-solutions#automatically-create-the-microsoft-teams-app-manifest-and-package), he will get validation failure from marketplace team when he wants to publish to Teams store. He needs to manually update the validDomains
field to pass the validation, is that expected?
@HuihuiWu-Microsoft I'd say uploading SPFx Teams solution to the marketplace is not a valid scenario at all as of now.
You must deploy sppkg
file to the SharePoint App Catalog to make it work.
That's why ISVs should use SharePoint Store for their solutions right now, not Teams marketplace.
If we go to the Teams Marketplace at some point, the validation should be changed to allow *.sharepoint.com
in validDomains
for SPFx solutions.
Got it, thanks @AJIXuMuK!
@HuihuiWu-Microsoft I have confirmed that changing *.sharepoint.com to {teamSiteDomain} should work. So it can be a way at least for now if someone wants to publish a solution to the marketplace.
Thanks for your feedback.
Let me recap the current status of the different issues, and my understanding of technical or functional analysis:
validDomains
that Teams app submission team ask to restrict to only url we own. They explicitly asked us to remove everything but {teamsSiteDomain}
and our hosted azure web apps which contains the logic. I raised an issue to highlight that a SPFX project bootstrapped contains invalid validDomains
regarding the validation. It sounds incorrect and unclear to have two MS teams (SFPX and Teams) not to have the same position regarding this restriction.validDomains
but this time with a technical view, is related to the incorrect {teamsSiteDomain}
resolution when there’s only compose extension in the manifest. Our testing shows that a task module url based on SPFX won’t load unless there’s another static or configurable tab also based on SPFX (seems like URL analysis in the manifest behaves differently on tabs and compose extension). Currently we have no solution regarding this, and I fear the discussion regarding this point is buried under the other debates. Maybe a new dedicated issue should be required.That said, @AJIXuMuK mentioned that the app should be put on SP marketplace, not a on Teams because the SPFX app won’t work without the sppkg deployed.
This is technically true, but we addressed the issue: the actual URL of our tabs and compose extension or not under {teamSiteDomain} but are in form of https://somehosting.azurewebsites.net/redirect=https:/%7bteamSiteDomain%7d/rest-of-path-to-spfx
.
This intermediate page allows us to perform some checks, especially if the user is in our customer DB.
Putting technical aspects aside, we are selling a Teams application, and our communication reflects this aspect. Even if the SharePoint side needs a technical setup, the front side of the app is mostly Teams.
That’s why we need to publish the app in Teams store, not in SP Store.
@HuihuiWu-Microsoft I have confirmed that changing *.sharepoint.com to {teamSiteDomain} should work. So it can be a way at least for now if someone wants to publish a solution to the marketplace.
Thanks @AJIXuMuK. You're right, I've also tested to replace *.sharepoint.com
to {teamSiteDomain}
and everything works. I think the only problem is that it may confuse users as @stevebeauge mentioned as 2nd issue. But I kind of understand because the Teams SPFx project can be published to either tenant scope or Teams marketplace while the validDomains
restriction is only from Teams marketplace side.
Hello,
Any update on this? (regarding the initial issue : compose extension not working on teams mobile if built with SPFX, issue with validDomains is another issue)
Thanks
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
On desktop :
On android : latest Teams app (1416/1.0.0.2023103504/0605)
Tested with SPFX 1.17.3 + node 16.20.1
Describe the bug / error
We are developing SPFX webparts that are exposed in Microsoft Teams.
Some webparts are exposed as
staticTabs
, some others ascomposeExtension
.On desktop, everything is working properly: both static tabs and compose extension are able to show the webparts:
Exemple of compose extension:
However, on Teams mobile I get an error (Android version but some users reported issue with IOS too):
In english:
Failed to load webview. Please check whether the specified app is available.
Most of the discussions I found related to this issue (like https://github.com/MicrosoftDocs/msteams-docs/issues/4254) are related to targeted content not available as IFrame because of CSP issues.
However, because the task module is hosted by SharePoint itself, I cannot control the headers sent by the server.
Since the webparts are OK as static tabs, I think this is very specific to the way Teams load the task module.
Because the failure happens before the webview is loaded. Web dev tools (inspect from edge://inspect) is not possible, the page is not yet loaded. I didn't find any location where I can get some clue about the error (no console,...).
In order to test, I took the manifest build automatically by sharepoint, and I just added the compose extension:
Steps to reproduce
_api/web/tenantappcatalog/downloadteamssolution(id)/$value
endpoint)In the extracted manifest, add a compose extension:
botId
to match the bot you set up previously and set thecomponentId
part inside the taskinfo url to your WebPart component (should be the same as the static tab already in the manifest)Expected behavior
Compose extension built using SPFX should works, same as static tabs built using same framework.