如何使用JSOM从SharePoint托管应用程序在主机Web上添加ScriptLink

时间:2017-07-19 08:53:15

标签: sharepoint sharepoint-2013 sharepoint-online sharepoint-apps sharepoint-jsom

我正在尝试使用JSOM从SharePoint托管的应用程序在Host Web上添加scriptLink。

我发现了一些文章可以提供样本(例如http://booden.net/JsomAddScriptLinkOnHostWeb.aspx),但它不再起作用了。
即使我已获得该应用的完全许可,我仍然收到以下错误消息:

Request failed: Access denied. You do not have permission to perform this action or access this resource.

还可以这样做吗?

1 个答案:

答案 0 :(得分:0)

显然,当我从visual studio运行解决方案时会发生错误。 一旦我发布应用程序然后上传并安装应用程序,它就会按预期工作。

总之,可以使用JSOM从SharePoint托管应用程序在主机Web上添加ScriptLink。

相关问题