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 {
75
75
if ($env: AzureWebJobsStorage -eq ' UseDevelopmentStorage=true' ) {
76
76
$DevSecretsTable = Get-CIPPTable - tablename ' DevSecrets'
77
77
$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
78
81
$Secret | Add-Member - MemberType NoteProperty - Name ' tenantid' - Value $TenantId - Force
79
82
$Secret | Add-Member - MemberType NoteProperty - Name ' applicationid' - Value $AppId.appId - Force
80
83
$Secret | Add-Member - MemberType NoteProperty - Name ' applicationsecret' - Value $AppPassword - Force
81
- Add-CIPPAzDataTableEntity @DevSecretsTable - Entity $Secret - Force
82
84
Write-Information ($Secret | ConvertTo-Json - Depth 5 )
85
+ Add-CIPPAzDataTableEntity @DevSecretsTable - Entity $Secret - Force
83
86
} else {
84
87
Set-AzKeyVaultSecret - VaultName $kv - Name ' tenantid' - SecretValue (ConvertTo-SecureString - String $TenantId - AsPlainText - Force)
85
88
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