Skip to content

Commit ad2d8e1

Browse files
committed
tweak get tenant alias update
1 parent 456486b commit ad2d8e1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/CIPPCore/Public/GraphHelper/Get-Tenants.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ function Get-Tenants {
108108
Write-Host 'Existing tenant found. We already have it cached, skipping.'
109109

110110
$DisplayNameUpdated = $false
111-
if (![string]::IsNullOrEmpty($Alias.Value)) {
111+
if (![string]::IsNullOrEmpty($Alias)) {
112112
if ($Alias.Value -ne $ExistingTenantInfo.displayName) {
113113
Write-Host "Alias found for $($_.Name)."
114-
$ExistingTenantInfo.displayName = $Alias.Value
114+
$ExistingTenantInfo.displayName = $Alias
115115
$DisplayNameUpdated = $true
116116
}
117117
} else {
@@ -157,9 +157,9 @@ function Get-Tenants {
157157
}
158158
Write-Host 'finished getting domain'
159159

160-
if (![string]::IsNullOrEmpty($Alias.Value)) {
160+
if (![string]::IsNullOrEmpty($Alias)) {
161161
Write-Host "Alias found for $($_.Name)."
162-
$displayName = $Alias.Value
162+
$displayName = $Alias
163163
} else {
164164
$displayName = $LatestRelationship.displayName
165165
}

0 commit comments

Comments
 (0)