Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function Invoke-ExecCombinedSetup {
if ($Request.Body.tenantId) { $Secret.TenantId = $Request.Body.tenantid }
if ($Request.Body.applicationId) { $Secret.ApplicationId = $Request.Body.applicationId }
if ($Request.Body.ApplicationSecret) { $Secret.ApplicationSecret = $Request.Body.ApplicationSecret }
if ($Request.Body.RefreshToken) { $Secret.RefreshToken = $Request.Body.RefreshToken }
Add-CIPPAzDataTableEntity @DevSecretsTable -Entity $Secret -Force
$Results.add('Manual credentials have been set in the DevSecrets table.')
} else {
Expand All @@ -100,6 +101,10 @@ function Invoke-ExecCombinedSetup {
Set-AzKeyVaultSecret -VaultName $kv -Name 'applicationsecret' -SecretValue (ConvertTo-SecureString -String $Request.Body.applicationSecret -AsPlainText -Force)
$Results.add('Set application secret in Key Vault.')
}
if ($Request.Body.RefreshToken) {
Set-AzKeyVaultSecret -VaultName $kv -Name 'refreshtoken' -SecretValue (ConvertTo-SecureString -String $Request.Body.RefreshToken -AsPlainText -Force)
$Results.add('Set refresh token in Key Vault.')
}
}

$Results.add('Manual credentials setup has been completed.')
Expand Down