How to map users from Tenant 1 to Tenant 2 while migrating project between these tenants?

213 Views Asked by At

I am using Azure DevOps Migration Tools to migrate my ADO Project A which is in Tenant A to Project B in Tenant B.

I have a similar set of users in both ADs but users in both these tenants have different email addresses.

I believe, when I run this migration, it will assign work items to placeholders as those users are not present in the target project(atleast with the same email address).

How can I overcome this? I want to map these users when migrating to Project B so that those users are correctly mapped with their email addresses in Tenant B.

For example, User A in source project with email [email protected] should be mapped to User A in target project with email [email protected].

Can I do that? If yes, then how?

(I can't use the approach of switching the Directory of my Project A to Tenant B as is suggested in the Docs of the tool)

2

There are 2 best solutions below

1
On BEST ANSWER

Here is another way, but still not nice, because you have to duplicate it for every field:

{
  "$type": "FieldValueMapConfig",
  "WorkItemTypeName": "*",
  "sourceField": "System.AssignedTo",
  "targetField": "System.AssignedTo",
  "valueMapping": {
    "Lastname, Firstname (Company)": "Firstname Lastname",
    "Lastname2, Firstname2 (Company)": "Firstname2 Lastname2"
  }
}

Here are the identity fields I know (please add more!):

"System.AssignedTo",
"System.ChangedBy",
"System.CreatedBy",
"Microsoft.VSTS.Common.ActivatedBy",
"Microsoft.VSTS.Common.ResolvedBy",
"Microsoft.VSTS.Common.ClosedBy"

There is a nice automated export to create a list of users in that format: ExportUsersForMapping

And an improvement is planned.

3
On

The template of Azure DevOps Migration Tools could map [email protected] to [email protected].

You just need to edit the template:

 {
      "$type": "MultiValueConditionalMapConfig",
      "WorkItemTypeName": "*",
      "sourceFieldsAndValues": {
        "Assigned To": "[email protected]",
        "Assigned To": "[email protected]"
      },
      "targetFieldsAndValues": {
        "Assigned To": "[email protected]",
        "Assigned To": "[email protected]"
      }
    },