From 31034669c807175e4661eeba9dadefa729199e4d Mon Sep 17 00:00:00 2001 From: "Metz, Benjamin" Date: Mon, 7 Nov 2022 14:15:55 +0100 Subject: [PATCH 1/2] fix: reverse changes --- Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 index 740a0cda1e..c1f8707cb1 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 @@ -2968,8 +2968,8 @@ function Get-M365DSCExportContentForResource if ($partialContent.ToLower().IndexOf($OrganizationName.ToLower()) -gt 0) { $partialContent = $partialContent -ireplace [regex]::Escape($OrganizationName + ':'), "`$($OrganizationName):" - $partialContent = $partialContent -ireplace [regex]::Escape('@' + $OrganizationName), "@`$TenantId" $partialContent = $partialContent -ireplace [regex]::Escape($OrganizationName), "`$OrganizationName" + $partialContent = $partialContent -ireplace [regex]::Escape('@' + $OrganizationName), "@`$OrganizationName" } $content += $partialContent $content += " }`r`n" From e661e96e073f3b98f55555fc04b23f260f84ed35 Mon Sep 17 00:00:00 2001 From: "Metz, Benjamin" Date: Mon, 7 Nov 2022 14:16:12 +0100 Subject: [PATCH 2/2] fix: remove organization splitting --- Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 index 4a5b8f69e2..4b37e5afaf 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 @@ -261,10 +261,6 @@ function Start-M365DSCConfigurationExtract } $AzureAutomation = $false - if ($organization.IndexOf('.') -gt 0) - { - $organization = $organization.Split('.')[0] - } [array] $version = Get-Module 'Microsoft365DSC' $version = $version[0].Version @@ -330,7 +326,6 @@ function Start-M365DSCConfigurationExtract { $_ -in 'CertificateThumbprint', 'CertificatePath', 'ApplicationWithSecret' } { $postParamContent.Append(" `$OrganizationName = `$ConfigurationData.NonNodeData.OrganizationName`r`n") | Out-Null - $postParamContent.Append(" `$TenantId = `$ConfigurationData.NonNodeData.TenantId`r`n") | Out-Null Add-ConfigurationDataEntry -Node 'NonNodeData' ` -Key 'OrganizationName' `