Skip to content

Commit f7d6a53

Browse files
committed
more casing
1 parent 7b22228 commit f7d6a53

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecApiClient.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ function Invoke-ExecApiClient {
102102
$Owner = $env:WEBSITE_OWNER_NAME
103103
if ($Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
104104
$RGName = $Matches.RGName
105+
} else {
106+
$RGName = $env:WEBSITE_RESOURCE_GROUP
105107
}
106108
$FunctionAppName = $env:WEBSITE_SITE_NAME
107109
try {
@@ -118,10 +120,12 @@ function Invoke-ExecApiClient {
118120
}
119121
}
120122
'SaveToAzure' {
121-
$TenantId = $env:TenantId
123+
$TenantId = $env:TenantID
122124
$Owner = $env:WEBSITE_OWNER_NAME
123125
if ($Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
124126
$RGName = $Matches.RGName
127+
} else {
128+
$RGName = $env:WEBSITE_RESOURCE_GROUP
125129
}
126130
$FunctionAppName = $env:WEBSITE_SITE_NAME
127131
$AllClients = Get-CIPPAzDataTableEntity @Table -Filter 'Enabled eq true' | Where-Object { ![string]::IsNullOrEmpty($_.RowKey) }

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecBackendURLs.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Function Invoke-ExecBackendURLs {
2121
$Owner = $env:WEBSITE_OWNER_NAME
2222
if ($Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
2323
$RGName = $Matches.RGName
24+
} else {
25+
$RGName = $env:WEBSITE_RESOURCE_GROUP
2426
}
2527

2628
$results = [PSCustomObject]@{

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecCustomData.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function Invoke-ExecCustomData {
230230
}
231231
'ListDirectoryExtensions' {
232232
try {
233-
$Uri = "https://graph.microsoft.com/beta/applications(appId='$($env:ApplicationId)')/extensionProperties"
233+
$Uri = "https://graph.microsoft.com/beta/applications(appId='$($env:ApplicationID)')/extensionProperties"
234234
$DirectoryExtensions = New-GraphGetRequest -uri $Uri -AsApp $true -NoAuthCheck $true -tenantid $env:TenantID
235235
$Existing = Get-CIPPAzDataTableEntity @CustomDataTable -Filter "PartitionKey eq 'DirectoryExtension'"
236236

@@ -271,7 +271,7 @@ function Invoke-ExecCustomData {
271271
throw 'Extension name, data type, and target objects are required.'
272272
}
273273

274-
$AppId = $env:ApplicationId # Replace with your application ID
274+
$AppId = $env:ApplicationID # Replace with your application ID
275275
$Uri = "https://graph.microsoft.com/beta/applications(appId='$AppId')/extensionProperties"
276276

277277
$BodyContent = @{
@@ -316,7 +316,7 @@ function Invoke-ExecCustomData {
316316
if (!$ExtensionName) {
317317
throw 'Extension name is missing in the request body.'
318318
}
319-
$AppId = $env:ApplicationId # Replace with your application ID
319+
$AppId = $env:ApplicationID # Replace with your application ID
320320
$Uri = "https://graph.microsoft.com/beta/applications(appId='$AppId')/extensionProperties/$ExtensionId"
321321

322322
# Delete the directory extension from Microsoft Graph

Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-UpdatePermissionsOrchestrator.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ function Start-UpdatePermissionsOrchestrator {
1010
Write-Information 'Updating Permissions'
1111

1212
$PartnerTenant = @{
13-
'customerId' = $env:TenantID
13+
'customerId' = $env:TenantID
1414
'defaultDomainName' = 'PartnerTenant'
15-
'displayName' = '*Partner Tenant'
15+
'displayName' = '*Partner Tenant'
1616
}
1717

1818
$TenantList = Get-Tenants -IncludeAll | Where-Object { $_.Excluded -eq $false }

0 commit comments

Comments
 (0)