本文介绍了O365迁移API错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我们正在使用O365迁移API'Createmigrationjob'.但是,当我们要部署角色分配时,会出现此错误.

不允许更新系统角色. CallStack-    at Microsoft.SharePoint.Deployment.RolesImport.ProcessSimpleElement(ImportStreamingContext上下文,XmlReader xr,SqlSession会话,SqlCommand comm,Int32 iRow)
    at Microsoft.SharePoint.Deployment.SqlBatchImport.Run()
    at Microsoft.SharePoint.Deployment.SecurityObjectSerializer.SetObjectData(对象obj,SerializationInfo信息,StreamingContext上下文,ISurrogateSelector选择器)
    at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(对象obj,序列化信息objectData,ISerializationSurrogate代理,ISurrogateSelector选择器)
    at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObjectDirect(Object objParent,Type objectType)
    at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(类型objectType,布尔值isChildObject,DeploymentObject信封)
    at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
    at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
    at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
    at Microsoft.SharePoint.Deployment.SPImport.Run()

Updates to system roles is not allowed. CallStack --    at Microsoft.SharePoint.Deployment.RolesImport.ProcessSimpleElement(ImportStreamingContext context, XmlReader xr, SqlSession session, SqlCommand comm, Int32 iRow)
   at Microsoft.SharePoint.Deployment.SqlBatchImport.Run()
   at Microsoft.SharePoint.Deployment.SecurityObjectSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
   at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(Object obj, SerializationInfo objectData, ISerializationSurrogate surrogate, ISurrogateSelector selector)
   at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObjectDirect(Object objParent, Type objectType)
   at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
   at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
   at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
   at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
   at Microsoft.SharePoint.Deployment.SPImport.Run()

Manifext.xml中有读取角色的定义代码段.

    < SPObject ID ="ca0c2472-216e-4bcf-8f66-b62b256c3a40" ObjectType ="DeploymentRoles"; ParentId ="7cc5bd87-8a49-40b6-9349-a9f77538ee61"; ParentWebId ="a2d765a9-43d9-4aeb-b18b-9abf5c3ea06c". ParentWebUrl ="/sites/nmspFitnesse/" Url ="anbeel_testdls">
        < Roles>
            <角色RoleId ="1073741826";标题=读". Description =读取级别" PermMask ="756052856929"隐藏=假" RoleOrder ="0"类型="2". />
        </Roles>
    </SPObject>
    < SPObject ID ="40e97e5b-c0e7-4965-9938-4b80268490ef". ObjectType ="DeploymentRoleAssignments"; ParentId ="7cc5bd87-8a49-40b6-9349-a9f77538ee61"; ParentWebId ="a2d765a9-43d9-4aeb-b18b-9abf5c3ea06c". ParentWebUrl ="/sites/nmspFitnesse/" Url ="anbeel_testdls">
        < RoleAssignments>
            < RoleAssignment ScopeId ="c77a3534-7c4a-48db-9c93-f6d06e331dfd"; RoleDefWebId ="a2d765a9-43d9-4aeb-b18b-9abf5c3ea06c" RoleDefWebUrl ="/sites/nmspFitnesse/" ObjectId ="02f9ba7d-a8c8-4bac-9569-d3f9786cedce". ObjectType ="2". ObjectUrl ="anbeel_testdls/test reader.pdf". AnonymousPermMask ="0">
                < Assignment RoleId ="1073741826" PrincipalId ="47". />
            </RoleAssignment>
        </RoleAssignments>
    </SPObject>

    <SPObject Id="ca0c2472-216e-4bcf-8f66-b62b256c3a40" ObjectType="DeploymentRoles" ParentId="7cc5bd87-8a49-40b6-9349-a9f77538ee61" ParentWebId="a2d765a9-43d9-4aeb-b18b-9abf5c3ea06c" ParentWebUrl="/sites/nmspFitnesse/" Url="anbeel_testdls">
        <Roles>
            <Role RoleId="1073741826" Title="Read" Description="Read Level" PermMask="756052856929" Hidden="false" RoleOrder="0" Type="2" />
        </Roles>
    </SPObject>
    <SPObject Id="40e97e5b-c0e7-4965-9938-4b80268490ef" ObjectType="DeploymentRoleAssignments" ParentId="7cc5bd87-8a49-40b6-9349-a9f77538ee61" ParentWebId="a2d765a9-43d9-4aeb-b18b-9abf5c3ea06c" ParentWebUrl="/sites/nmspFitnesse/" Url="anbeel_testdls">
        <RoleAssignments>
            <RoleAssignment ScopeId="c77a3534-7c4a-48db-9c93-f6d06e331dfd" RoleDefWebId="a2d765a9-43d9-4aeb-b18b-9abf5c3ea06c" RoleDefWebUrl="/sites/nmspFitnesse/" ObjectId="02f9ba7d-a8c8-4bac-9569-d3f9786cedce" ObjectType="2" ObjectUrl="anbeel_testdls/test reader.pdf" AnonymousPermMask="0">
                <Assignment RoleId="1073741826" PrincipalId="47" />
            </RoleAssignment>
        </RoleAssignments>
    </SPObject>

我记得去年完成时效果很好.突然没用.我怀疑"PermMask"的值不同.我们从SPBasePermissionsWrapper枚举中计算得出.

推荐答案

请检查以下BasePermissions:

Please check the BasePermissions below:

EmptyMask=0
ViewListItems=1
AddListItems=2
EditListItems=4
DeleteListItems=8
ApproveItems=16
OpenItems=32
ViewVersions=64
DeleteVersions=128
CancelCheckout=256
ManagePersonalViews=512
ManageLists=2048
ViewFormPages=4096
Open=65536
ViewPages=131072
AddAndCustomizePages=262144
ApplyThemeAndBorder=524288
ApplyStyleSheets=1048576
ViewUsageData=2097152
CreateSSCSite=4194304
ManageSubwebs=8388608
CreateGroups=16777216
ManagePermissions=33554432
BrowseDirectories =67108864
BrowseUserInfo=134217728
AddDelPrivateWebParts=268435456
UpdatePersonalWebParts=536870912
ManageWeb=1073741824
UseClientIntegration=0
UseRemoteAPIs=0
ManageAlerts=0
CreateAlerts=0
EditMyUserInfo=0
EnumeratePermissions=0
FullMask=65535
AnonymousSearchAccessList=8192
AnonymousSearchAccessWebLists=-2147483648

我们可以使用JavaScript代码进行检查.

We can use JavaScript code to check it.

<script type="text/javascript">
function getBasePermissions(){
var perm = new SP.BasePermissions();
	perm.set(SP.PermissionKind.manageWeb);
	console.log("manageWeb="+perm.




这篇关于O365迁移API错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 01:43