File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Setup Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,14 @@ Function Invoke-ExecCreateSAMApp {
7575 if ($env: AzureWebJobsStorage -eq ' UseDevelopmentStorage=true' ) {
7676 $DevSecretsTable = Get-CIPPTable - tablename ' DevSecrets'
7777 $Secret = Get-CIPPAzDataTableEntity @DevSecretsTable - Filter " PartitionKey eq 'Secret' and RowKey eq 'Secret'"
78+ if (! $Secret ) { $Secret = New-Object - TypeName PSObject }
79+ $Secret | Add-Member - MemberType NoteProperty - Name ' PartitionKey' - Value ' Secret' - Force
80+ $Secret | Add-Member - MemberType NoteProperty - Name ' RowKey' - Value ' Secret' - Force
7881 $Secret | Add-Member - MemberType NoteProperty - Name ' tenantid' - Value $TenantId - Force
7982 $Secret | Add-Member - MemberType NoteProperty - Name ' applicationid' - Value $AppId.appId - Force
8083 $Secret | Add-Member - MemberType NoteProperty - Name ' applicationsecret' - Value $AppPassword - Force
81- Add-CIPPAzDataTableEntity @DevSecretsTable - Entity $Secret - Force
8284 Write-Information ($Secret | ConvertTo-Json - Depth 5 )
85+ Add-CIPPAzDataTableEntity @DevSecretsTable - Entity $Secret - Force
8386 } else {
8487 Set-AzKeyVaultSecret - VaultName $kv - Name ' tenantid' - SecretValue (ConvertTo-SecureString - String $TenantId - AsPlainText - Force)
8588 Set-AzKeyVaultSecret - VaultName $kv - Name ' applicationid' - SecretValue (ConvertTo-SecureString - String $Appid.appId - AsPlainText - Force)
You can’t perform that action at this time.
0 commit comments