如何使用JSOM从SharePoint托管的应用程序在主机Web上添加脚本链接

如何使用JSOM从SharePoint托管的应用程序在主机Web上添加脚本链接,sharepoint,sharepoint-2013,sharepoint-online,sharepoint-apps,sharepoint-jsom,Sharepoint,Sharepoint 2013,Sharepoint Online,Sharepoint Apps,Sharepoint Jsom,我正在尝试使用JSOM从SharePoint托管的应用程序在主机web上添加脚本链接 我找到了一些文章,这些文章提供了一些示例(例如),但这些示例已经不起作用了。 尽管我已授予该应用程序的完全权限,但仍收到以下错误消息:请求失败:访问被拒绝。您没有执行此操作或访问此资源的权限 Request failed: Access denied. You do not have permission to perform this action or access this resource. 还有可能这

我正在尝试使用JSOM从SharePoint托管的应用程序在主机web上添加脚本链接

我找到了一些文章,这些文章提供了一些示例(例如),但这些示例已经不起作用了。
尽管我已授予该应用程序的完全权限,但仍收到以下错误消息:请求失败:访问被拒绝。您没有执行此操作或访问此资源的权限

Request failed: Access denied. You do not have permission to perform this action or access this resource.
还有可能这样做吗

显然,错误发生在我从visual studio运行解决方案时。 一旦我发布了应用程序,然后上传并安装了应用程序,它就可以正常工作了

总之,可以使用JSOM从SharePoint托管的应用程序在主机Web上添加脚本链接