Teams Tab应用程序错误 - 拒绝显示' https://somedomain.sharepoint.com/'在框架中,因为它设置了x-frame-options'到Sameorigin'

发布于 2025-02-04 04:06:42 字数 995 浏览 2 评论 0 原文

将Teams Tab应用程序重定向到SharePoint站点(例如Viva应用程序)时,上述错误正在出现标签。这仅发生在Microsoft 365用户帐户中。是否有任何理由SharePoint.com在清单中允许?

重定向URL https://devacc.sharepoint.com/_layouts/15/teamslogon.aspx

?强>明显

{
    "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json",
    "manifestVersion": "1.9",
    "version": "1.0.0",

 ....
 ....
 
    "validDomains": [
        "{teamSiteDomain}", 
        "*.login.microsoftonline.com",
        "*.sharepoint.com",
        "resourceseng.blob.core.windows.net"
    ],
    "webApplicationInfo": {
        "resource": "https://{teamSiteDomain}",
        "id": "bbc6d1e2-2233-4dc7-1122-0eaa862aaccc"
    },
    "isFullScreen": true
}

While redirecting teams tab App to the SharePoint site such as Viva app , above error is appearing the tab. this is only happened for the Microsoft 365 user accounts. is there any reason where sharepoint.com is already allowed in manifest ?

redirect url
https://devacc.sharepoint.com/_layouts/15/teamslogon.aspx?spfx=true&dest=https://devacc.sharepoint.com/sites/HomeSite?app=portals

manifest

{
    "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json",
    "manifestVersion": "1.9",
    "version": "1.0.0",

 ....
 ....
 
    "validDomains": [
        "{teamSiteDomain}", 
        "*.login.microsoftonline.com",
        "*.sharepoint.com",
        "resourceseng.blob.core.windows.net"
    ],
    "webApplicationInfo": {
        "resource": "https://{teamSiteDomain}",
        "id": "bbc6d1e2-2233-4dc7-1122-0eaa862aaccc"
    },
    "isFullScreen": true
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆夏时光 2025-02-11 04:06:42

浏览器相同的原始策略限制可防止网页与所服务的网页提出不同域的请求。

因此,您可以将配置或内容页面重定向到另一个域或子域。您的跨域导航逻辑需要允许团队客户端在加载或与选项卡进行加载或通信时,在应用程序清单中验证原点。

参考文档:

Browsers same-origin policy restriction prevents webpages from making requests to different domains than the served web page.

So, you can redirect the configuration or content page to another domain or subdomain. Your cross-domain navigation logic needs to allow the Teams client to validate the origin against a static validDomains list in the app manifest when loading or communicating with the tab.

Ref Doc:https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/tab-requirements

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文