Skip to content

Commit

Permalink
Merge pull request #1 from BenneMe/OrganizationNameFix2
Browse files Browse the repository at this point in the history
Organization name fix2
  • Loading branch information
BenneMe authored Nov 7, 2022
2 parents 84bd049 + e661e96 commit 8bcb8a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' `
Expand Down
2 changes: 1 addition & 1 deletion Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8bcb8a9

Please sign in to comment.