简体   繁体   中英

Create list using C# CSOM in a subsite on Office SharePoint O365

We have a SharePoint 2013 Provider-Hosted App using C# CSOM that has been deployed to a Developer site under the root site. One of the requirements of our app is that it should be able to create lists in the site where the app is deployed and trusted as well as to subsites below this site, once the user has access. However, when trying to create a list on a subsite of the developer site we get a 403 Forbidden error.

Is there any way to create lists on subsites from our app or am I only able to create lists on the site my app was deployed to?

您需要使用AppOnlyAccessToken( TokenHelper.GetAppOnlyAccessToken() )来执行此操作,并允许该应用程序在SharePoint中进行仅应用程序的调用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM