File tree Expand file tree Collapse file tree 9 files changed +9
-9
lines changed
HTTP Functions/CIPP/Setup Expand file tree Collapse file tree 9 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function Set-CippApiAuth {
1010 if ($env: MSI_SECRET ) {
1111 Disable-AzContextAutosave - Scope Process | Out-Null
1212 $null = Connect-AzAccount - Identity
13- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
13+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
1414 $Context = Set-AzContext - SubscriptionId $SubscriptionId
1515 } else {
1616 $Context = Get-AzContext
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ Function Invoke-ExecSAMSetup {
5252 if ($env: MSI_SECRET ) {
5353 Disable-AzContextAutosave - Scope Process | Out-Null
5454 $null = Connect-AzAccount - Identity
55- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
55+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
5656 $null = Set-AzContext - SubscriptionId $SubscriptionId
5757 }
5858 }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function Start-UpdateTokensTimer {
2626 if ($env: MSI_SECRET ) {
2727 Disable-AzContextAutosave - Scope Process | Out-Null
2828 $null = Connect-AzAccount - Identity
29- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
29+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
3030 $null = Set-AzContext - SubscriptionId $SubscriptionId
3131 }
3232 $KV = ($ENV: WEBSITE_DEPLOYMENT_ID -split ' -' )[0 ]
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ function Get-CIPPAuthentication {
2020 }
2121 } else {
2222 Connect-AzAccount - Identity
23- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
23+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
2424 $null = Set-AzContext - SubscriptionId $SubscriptionId
2525 $keyvaultname = ($ENV: WEBSITE_DEPLOYMENT_ID -split ' -' )[0 ]
2626 $Variables | ForEach-Object {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function Test-CIPPAccessPermissions {
3535 try {
3636 Disable-AzContextAutosave - Scope Process | Out-Null
3737 $null = Connect-AzAccount - Identity
38- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
38+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
3939 $null = Set-AzContext - SubscriptionId $SubscriptionId
4040
4141 $KV = $ENV: WEBSITE_DEPLOYMENT_ID
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function Get-ExtensionAPIKey {
2222 } else {
2323 $keyvaultname = ($ENV: WEBSITE_DEPLOYMENT_ID -split ' -' )[0 ]
2424 $null = Connect-AzAccount - Identity
25- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
25+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
2626 $null = Set-AzContext - SubscriptionId $SubscriptionId
2727 $APIKey = (Get-AzKeyVaultSecret - VaultName $keyvaultname - Name $Extension - AsPlainText)
2828 }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function Set-ExtensionAPIKey {
2525 } else {
2626 $keyvaultname = ($ENV: WEBSITE_DEPLOYMENT_ID -split ' -' )[0 ]
2727 $null = Connect-AzAccount - Identity
28- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
28+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
2929 $null = Set-AzContext - SubscriptionId $SubscriptionId
3030 $null = Set-AzKeyVaultSecret - VaultName $keyvaultname - Name $Extension - SecretValue (ConvertTo-SecureString - AsPlainText - Force - String $APIKey )
3131 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ function Get-GradientToken {
44 )
55 if ($Configuration.vendorKey ) {
66 $null = Connect-AzAccount - Identity
7- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
7+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
88 $null = Set-AzContext - SubscriptionId $SubscriptionId
99 $keyvaultname = ($ENV: WEBSITE_DEPLOYMENT_ID -split ' -' )[0 ]
1010 $partnerApiKey = (Get-AzKeyVaultSecret - VaultName $keyvaultname - Name ' Gradient' - AsPlainText)
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ function Get-HIBPAuth {
99 $Secret = (Get-CIPPAzDataTableEntity @DevSecretsTable - Filter " PartitionKey eq 'HIBP' and RowKey eq 'HIBP'" ).APIKey
1010 } else {
1111 $null = Connect-AzAccount - Identity
12- $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' +' | Select-Object - First 1
12+ $SubscriptionId = $ENV: WEBSITE_OWNER_NAME -split ' \ +' | Select-Object - First 1
1313 $null = Set-AzContext - SubscriptionId $SubscriptionId
1414
1515 $VaultName = ($ENV: WEBSITE_DEPLOYMENT_ID -split ' -' )[0 ]
You can’t perform that action at this time.
0 commit comments