From cc6adbdddaf9fc2ea1464c6835a782cb1f8341b6 Mon Sep 17 00:00:00 2001 From: Dan Guilliams Date: Tue, 25 Nov 2025 16:25:00 -0800 Subject: [PATCH 1/2] Updating mapping and command names for cross tenant migration jobs --- config/ModulesMapping.jsonc | 2 +- src/Migrations/Migrations.md | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/Migrations/Migrations.md diff --git a/config/ModulesMapping.jsonc b/config/ModulesMapping.jsonc index a085e1628a..6d2635e07c 100644 --- a/config/ModulesMapping.jsonc +++ b/config/ModulesMapping.jsonc @@ -26,7 +26,7 @@ "Identity.Partner": "^tenantRelationships.delegatedAdminRelationship$|^tenantRelationships.delegatedAdminCustomer$", "Mail": "^users.inferenceClassification$|^users.mailFolder$|^users.message$", "ManagedTenants": "^tenantRelationships.managedTenant$", - "Migrations": "^solutions.migrations", + "Migrations": "^solutions.migrationsRoot", "NetworkAccess": "^networkAccess\\.", "Notes": "^users.onenote$|^groups.onenote$|^sites.onenote$", "People": "^users.person$|^users.profile$|^users.officeGraphInsights$|^users.userAnalytics$", diff --git a/src/Migrations/Migrations.md b/src/Migrations/Migrations.md new file mode 100644 index 0000000000..b4b40d63e3 --- /dev/null +++ b/src/Migrations/Migrations.md @@ -0,0 +1,41 @@ +# Migrations + +This directory contains common [AutoREST.PowerShell](https://github.com/Azure/autorest.powershell) configurations for Migrations v1.0 and/or beta modules. + +## AutoRest Configuration + +> see + +``` yaml +require: + - $(this-folder)/../readme.graph.md +``` + +### Directives + +> see https://github.com/Azure/autorest/blob/master/docs/powershell/directives.md + +``` yaml +# Directives go here! + +# Rename commands with 'SolutionMigrationCrossTenantMigrationJob' CrossTenantMigrationJob<> +directive: + - where: + subject: (^SolutionMigrationCrossTenantMigrationJob)(.*) + set: + subject: CrossTenantMigrationJob$2 +# Remove all the 'DisplayName','SolutionMigration', and 'Count' commands, they are redundant/unsupported + - where: + subject: (DisplayName$|SolutionMigration$|Count$) + remove: true +# Remove extra 'Remove' commands, only jobs can be removed + - where: + verb: Remove + subject: CrossTenantMigrationJob.+$ + remove: true +# Remove New/Update-CrossTenantMigrationJobUser, they are not supported operations + - where: + verb: (New|Update) + subject: CrossTenantMigrationJobUser$ + remove: true +``` From f559d830b5bad9a2ca3cdadd54a8fa167ba705f0 Mon Sep 17 00:00:00 2001 From: Dan Guilliams Date: Tue, 25 Nov 2025 16:29:29 -0800 Subject: [PATCH 2/2] Fixing comments for Migrations module autorest config --- src/Migrations/Migrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Migrations/Migrations.md b/src/Migrations/Migrations.md index b4b40d63e3..302a83883c 100644 --- a/src/Migrations/Migrations.md +++ b/src/Migrations/Migrations.md @@ -18,7 +18,7 @@ require: ``` yaml # Directives go here! -# Rename commands with 'SolutionMigrationCrossTenantMigrationJob' CrossTenantMigrationJob<> +# Rename commands with 'SolutionMigrationCrossTenantMigrationJob' to 'CrossTenantMigrationJob' directive: - where: subject: (^SolutionMigrationCrossTenantMigrationJob)(.*)