SharePoint和MSFT团队集成 [英] SharePoint and MSFT Teams Integration

查看:73
本文介绍了SharePoint和MSFT团队集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在开发一个使用MSFT团队和SharePoint的播放应用。团队使用SharePoint。在这个应用程序中,我上传图像的方式与团队上传到SharePoint(频道文件夹包含图像)的方式相同。然后我将URL传递给MSFT团队创建
消息API(其中包含用于格式化消息的HTML),如下所示:


< img src =" sharepointUrl" />


在初始加载MSFT团队时,会发现所有图像都是空白的。它们只是灰色框,css类为"ts-loading"。


然而,图像确实有效。当我打开sharepoint URL,然后刷新MSFT团队时,每个单独的sharepoint图像都会加载。


这可以在多个浏览器(chrome,edge,firefox)和不同的计算机上重现同样。我基本上可以在现场重现,并且"修复"。在打开SharePoint网址后,它就在现场。


我的直觉是SharePoint设置了一些cookie或授予权限的东西。在团队的初始加载时,由于用户没有与SharePoint交互,因此这些令牌不存在,我无法加载任何图像。


编辑:我认为我的直觉是正确。如果我进入团队并且尚未通过SharePoint进行身份验证,则SharePoint不会授予我权限,因为我没有存储任何sharepoint令牌cookie。但是,当我打开SharePoint URL时,
浏览器URL会短暂显示login.microsoft.com,使用我的MSFT凭据,然后授予我cookie。然后我刷新到团队,所有图像都有效。


有没有解决方法?








$

解决方案

您好,


作为解决方法,您可以为SharePoint Online启用外部共享。以下官方文档供您参考。


https://docs.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off


最诚挚的问候,


Dennis


Hi,

I'm working on a play app that uses MSFT Teams and SharePoint. Teams uses SharePoint under the hood. In this app, I upload images in the same way that Teams uploads to SharePoint (channel folders contain images). I then pass the URLs to MSFT Teams create message API (which takes in HTML for message formatting) like so:

<img src="sharepointUrl" />

On an initial load of MSFT Teams, one will find that all the images are blank. They are simply grey boxes, with a css class of "ts-loading".

However, the images do work. The moment I open up the sharepoint URL, and then refresh MSFT teams, every single sharepoint image loads.

This has been reproducible over multiple browsers (chrome, edge, firefox) and on different computers as well. I can basically reproduce on the spot, and "fix" it on the spot after opening up a SharePoint url.

My intuition is that the SharePoint sets some cookies or something which grants permissions. On the initial load of Teams, since the user has not interacted with SharePoint, these tokens don't exist and I'm unable to load any images.

edit: I think my intuition is correct. If I went into Teams and have not been authenticated with SharePoint, SharePoint will not grant me permissions because I don't have any sharepoint token cookies stored. However, when I open up the SharePoint url, the browser URL briefly shows login.microsoft.com, uses my MSFT credentials, and then grants me the cookies. I then refresh to Teams, and all the images work.

Is there any workaround for this?

解决方案

Hi,

As a workaround, you can turn external sharing on for SharePoint Online. The following official document for your reference.

https://docs.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off

Best Regards,

Dennis


这篇关于SharePoint和MSFT团队集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆