We are using O365 migration API 'Createmigrationjob'. However we got this error when we want to deploy roleassignments.
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()
There is definition snippet for read role in 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>
<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>