简体   繁体   English

Sharepoint 2013-创建组

[英]Sharepoint 2013 - Create group

I'm trying to create a Sharepoint 2013 (autohosted) group. 我正在尝试创建一个Sharepoint 2013(自动托管)组。 In AppManifest I set Permissions> Site collection> Managed. 在AppManifest中,我设置“权限”>“网站集”>“托管”。 Unfortunately I can not use Full-control. 不幸的是我不能使用完全控制。

var collGroups = ClientContextAppWeb.Web.SiteGroups;
ClientContextAppWeb.Load(collGroups);
ClientContextAppWeb.ExecuteQuery();

if (!collGroups.Any(a => a.Title.Equals("IT Helpdesk Admins")))
{
    var groupInfo = new Microsoft.SharePoint.Client.GroupCreationInformation()
    {
        Title = "IT Helpdesk Admins"
    };

    collGroups.Add(groupInfo);
    ClientContextAppWeb.Web.Update();
    ClientContextAppWeb.ExecuteQuery();
}

An error occurs when creating group - ServerUnauthorizedAccessException 创建组时发生错误-ServerUnauthorizedAccessException

Are there other options to create groups? 还有其他创建群组的选项吗?

It can read value at the top level but when if try to query for webs.Webs, web.Lists or web.RootFolder, this is when you get the exception. 它可以在顶层读取值,但是如果尝试查询webs.Webs,web.Lists或web.RootFolder,则是在获取异常时。 With a full user account it dont have the problem, but for others users will only have limited access to certain areas of the site, ie a particular document library. 使用完整的用户帐户,就不会出现问题,但是对于其他用户,只能有限地访问站点的某些区域,即特定的文档库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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