Microsoft Teams paltictabs在Azure中使用Oauth AAD授权

发布于 2025-02-11 09:09:56 字数 558 浏览 0 评论 0 原文

我从MS存储库中为Microsoft Teams创建了一个基本的演示自定义应用“> https://github.com/officedev/teamsfx-samples/tree/v1.0.0.0/hello-world-tab 。我在Azure中已经存在的页面中添加了其他静态选项卡(在Azure上托管的应用程序通过AAD确保了)。在应用程序清单中
{ “ EntityId”:“ 0000002”, “名称”:“ nameofapp”, “ contenturl”:“ https://nameofapp.azurewebsites.net”, “ weblityurl”:“ https://nameofapp.azurewebsites.net”, “范围”:[ “个人的”。 这是给出的 },

问题在于,当我通过浏览器启动该应用程序时,该应用程序以某种方式设法授权自身授权到受保护的应用程序,但是当我通过桌面应用程序

错误消息打开时会出现错误:拒绝显示'https:// login .microsoftonline.com/'在框架中,因为它将“ X-Frame-Options”设置为“否认”。

我如何授权PC应用程序MS团队?

I created a basic demo custom app for microsoft teams from the MS repository https://github.com/OfficeDev/TeamsFx-Samples/tree/v1.0.0/hello-world-tab . I added additional static tabs to my already existing page in azure (application hosted on Azure is secured via AAD). In the app manifest
{
"entityId": "0000002",
"name": "NameOfApp",
"contentUrl": "https://nameofapp.azurewebsites.net",
"websiteUrl": "https://nameofapp.azurewebsites.net",
"scopes": [
"personal".
]
},

The problem is that the application somehow manages to authorise itself to the protected application when I launch it via the browser, but I get an error when I open it via the desktop application

Error message : Refused to display 'https://login.microsoftonline.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

How can I authorise in PC applications MS Teams ?

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

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

发布评论

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

评论(1

动次打次papapa 2025-02-18 09:09:56

登录页面不会在iframes中呈现,作为防止点夹克的保障。

您的身份验证逻辑需要使用重定向以外的其他方法。例如,使用基于令牌或基于cookie的身份验证。

参考文档:

Login pages don't render in iFrames, as a safeguard against clickjacking.

Your authentication logic needs to use a method other than redirect. For example, use token-based or cookie-based authentication.

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

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