使用REST从SharePoint加载项访问外部列表

时间:2017-11-14 05:21:04

标签: sharepoint-online sharepoint-2016 bdc

我在加载项中使用SharePoint REST API来访问列表数据。当我查询"正常"列表,我得到了结果。当我尝试查询外部列表时,出现401错误。当我尝试在浏览器中访问REST URL时出现同样的错误:

http://add-in-6f1ecc432fad91.myaddins.com/sites/development/_api/lists/getbytitle(' TestExternalList')/项目

当我尝试在应用程序外部访问它时,它可以正常工作:

http://sharepoint/sites/development/_api/lists/getbytitle(' TestExternalList')/项目

我知道您无法从加载项访问外部内容类型:

http://toddbaginski.com/blog/accessing-bcs-external-data-from-an-app-for-sharepoint-2013/

所以我尝试按照网站打包我的BCS模型,我收到以下错误:

项目项目" TestBDC"无法通过沙盒解决方案中的功能进行部署。

所以我的问题是,是否可以通过加载项访问外部列表?

我正在使用SharePoint 2016。

1 个答案:

答案 0 :(得分:1)

听起来可能是权限问题。您是否在应用权限中设置了BCS范围?

这是一篇有关设置安全性信息的文章 https://docs.microsoft.com/en-us/sharepoint/dev/general-development/add-in-scoped-external-content-types-in-sharepoint

相关问题