Skip to content

Commit 9e68fff

Browse files
authored
Merge pull request #917 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents b2426a3 + 54a5441 commit 9e68fff

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Modules/CIPPCore/Public/Get-CIPPTextReplacement.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ function Get-CIPPTextReplacement {
4444
'%organizationid%'
4545
)
4646

47-
$Tenant = Get-Tenants -TenantFilter $TenantFilter
48-
$CustomerId = $Tenant.customerId
47+
if ($TenantFilter -ne $env:TenantID) {
48+
$Tenant = Get-Tenants -TenantFilter $TenantFilter
49+
$CustomerId = $Tenant.customerId
50+
} else {
51+
$CustomerId = $TenantFilter
52+
}
4953

5054
#connect to table, get replacement map. The replacement map will allow users to create custom vars that get replaced by the actual values per tenant. Example:
5155
# %WallPaperPath% gets replaced by RowKey WallPaperPath which is set to C:\Wallpapers for tenant 1, and D:\Wallpapers for tenant 2

0 commit comments

Comments
 (0)