Addressing the Principal team is missing privileges Error while Migrating Dynamics CRM Data

Zoe Sands, 28 August 2015

While performing a data migration between Dynamics CRM instances using the SSIS Integration Toolkit I encountered this error while attempting to migrate Accounts:

Principal team (Id=xxx, type=9) is missing prvReadAccount privilege

This error occurs because many of these Account records are owned by Teams, but their Security Role assignments have not yet been migrated. Teams cannot be assigned a record if they do not at least have “read” permissions to Accounts.

A Teams Security Roles are stored inside the teamroles intersect table which is an N:N relationship between Security Role and Team.

In the SSIS Toolkit, I have set the following destination settings to migrate team roles:

image

Note that the Action is set to “Upsert”. This will ignore any “Cannot insert duplicate key” errors upon migration. The Upsert Matching Criteria is Manually Specify, which is an imposed requirement as an N:N relationship entity does not have a primary key. In this case the matching criteria should be the Security Role ID and the Team ID.

image

Perform the migration of Team Roles after migrating Teams and before migrating Accounts or any other records that have Teams assigned to them. You will then be able to migrate accounts without error.