Skip to content

Commit

Permalink
fix deploy script errors which failed on latest az and AzureAD tools
Browse files Browse the repository at this point in the history
  • Loading branch information
freistli committed Jun 5, 2023
1 parent 229c711 commit a4dafd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,7 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

parameters.local.json

*.zip
12 changes: 6 additions & 6 deletions Deployment/deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function CreateAzureADApp {
if ($updateDecision -eq 0) {
WriteI -message "Updating the existing app..."

az ad app update --id $app.appId --available-to-other-tenants $MultiTenant --oauth2-allow-implicit-flow $AllowImplicitFlow
az ad app update --id $app.appId --sign-in-audience AzureADMultipleOrgs --enable-access-token-issuance $AllowImplicitFlow

WriteI -message "Waiting for app update to finish..."

Expand All @@ -319,11 +319,11 @@ function CreateAzureADApp {
}
} else {
# Create Azure AD app registration using CLI
az ad app create --display-name $appName --available-to-other-tenants $MultiTenant --oauth2-allow-implicit-flow $AllowImplicitFlow
az ad app create --display-name $appName --sign-in-audience AzureADMultipleOrgs --enable-access-token-issuance $AllowImplicitFlow

WriteI -message "Waiting for app creation to finish..."

Start-Sleep -s 10
Start-Sleep -s 30

WriteS -message "Azure AD App: $appName is created."
}
Expand Down Expand Up @@ -772,7 +772,7 @@ function ADAppUpdate {
az ad app update --id $configAppId --identifier-uris $IdentifierUris
WriteI -message "App URI set"

$configApp = az ad app update --id $configAppId --reply-urls $RedirectUris
$configApp = az ad app update --id $configAppId --web-redirect-uris $RedirectUris
WriteI -message "App reply-urls set"

az ad app update --id $configAppId --optional-claims './AadOptionalClaims.json'
Expand Down Expand Up @@ -996,7 +996,7 @@ function logout {

if (-not (Get-Module -ListAvailable -Name "AzureAD")) {
WriteI -message"Installing AzureAD module..."
Install-Module AzureAD -Scope CurrentUser -Force
Install-Module AzureAD -AllowClobber -Scope CurrentUser -Force
}

if (-not (Get-Module -ListAvailable -Name "WriteAscii")) {
Expand All @@ -1023,7 +1023,7 @@ function logout {
}

# Start Deployment.
Write-Ascii -InputObject "Company Communicator v5.2" -ForegroundColor Magenta
Write-Ascii -InputObject "Company Communicator v5.4" -ForegroundColor Magenta
WriteI -message "Starting deployment..."

# Initialize connections - Azure Az/CLI/Azure AD
Expand Down

0 comments on commit a4dafd8

Please sign in to comment.