You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($ExistingTenantInfo-and$ExistingTenantInfo.RequiresRefresh-eq$false-and$ExistingTenantInfo.displayName-eq$LatestRelationship.displayName) {
107
+
if ($ExistingTenantInfo-and$ExistingTenantInfo.RequiresRefresh-eq$false-and($ExistingTenantInfo.displayName-eq$LatestRelationship.displayName-or$ExistingTenantInfo.displayName-eq$Alias)) {
108
108
Write-Host'Existing tenant found. We already have it cached, skipping.'
109
+
110
+
$DisplayNameUpdated=$false
111
+
if (![string]::IsNullOrEmpty($Alias.Value)) {
112
+
if ($Alias.Value-ne$ExistingTenantInfo.displayName) {
113
+
Write-Host"Alias found for $($_.Name)."
114
+
$ExistingTenantInfo.displayName=$Alias.Value
115
+
$DisplayNameUpdated=$true
116
+
}
117
+
} else {
118
+
if ($LatestRelationship.displayName-ne$ExistingTenantInfo.displayName) {
119
+
Write-Host"Display name changed from relationship, updating."
0 commit comments