更新 Microsoft.SharePoint.Client.FieldCollection 字段需要什么权限 Microsoft 图形范围

问题描述

我收到拒绝访问。您无权执行此操作或访问此资源。在以下代码中执行时出现异常错误

更新Microsoft.SharePoint.Client.FieldCollection 字段需要什么样的权限(范围)?

if (existingFieldElement.Attribute("Version") != null)
                        {
                            existingFieldElement.Attributes("Version").Remove();
                        }
                        existingField.SchemaXml = parser.ParseXmlString(existingFieldElement.ToString());
                        existingField.UpdateAndPushChanges(true);
                        web.Context.Load(existingField,f => f.TypeAsstring,f => f.DefaultValue);
                        try
                        {
                            web.Context.ExecuteQueryRetry();
                        }

这是发生错误的确切位置。

https://github.com/pnp/pnpframework/blob/dev/src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectField.cs#L185

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)