OfficeDev/microsoft-teams-apps-requestateam

Azure AD app creation fails with error "unrecognized arguments: --password"

Closed this issue · 1 comments

Description

I get an error running the deploy.ps1 script:
unrecognized arguments: --password XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Seems like there's an error with line 544 with the "az ad app create" command. It doesn't seem like an app ever gets registered.

Steps to reproduce

  1. Run deploy.ps1
  2. Sign in 3 times with global admin
  3. Let script run
  4. I get the error: unrecognized arguments: --password XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5. I have let the script continue but there seems to be no point as there are more errors and the app never gets registered in Azure.

Expected results

It should register an Azure app and continue without errors.

Actual Results

See below commandline output. The last line shows the error, which is displayed in red in the console.

.\deploy.ps1` -TenantName "xxxxxx" -TenantId "xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx" -RequestsSiteName "RequestATeam" -RequestsSiteDesc "Request a Team" -ManagedPath "Sites" -SubscriptionId "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Location westeurope -ResourceGroupName "RequestATeam" -AppName "RequestATeamApp" -ServiceAccountUPN "request-a-team@xxx.xxx" -IsEdu $true -KeyVaultName "requestateam798431-kv" -EnableSensitivity $false
###  DEPLOYMENT SCRIPT STARTED
(c) Microsoft Corporation ###
Installing required PowerShell Modules...
Installed modules
                                      _                         _
 _ __   ___   __ _  _   _   ___  ___ | |_          __ _        | |_   ___   __ _  _ __ ___
| '__| / _ \ / _` || | | | / _ \/ __|| __| _____  / _` | _____ | __| / _ \ / _` || '_ ` _ \
| |   |  __/| (_| || |_| ||  __/\__ \| |_ |_____|| (_| ||_____|| |_ |  __/| (_| || | | | | |
|_|    \___| \__, | \__,_| \___||___/ \__|        \__,_|        \__| \___| \__,_||_| |_| |_|
                |_|
Launching Azure sign-in...
Checking for availability of Key Vault...
Key Vault is available.
Launching Azure AD sign-in...

Launching Azure CLI sign-in...
WARNING: A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.
Connected to Azure
Launching PnP sign-in...
Connected to SPO
### AZURE AD APP CREATION ###
WARNING: This command or command group has been migrated to Microsoft Graph API. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-graph-migration
Creating Azure AD App - 'RequestATeamApp'...
This command or command group has been migrated to Microsoft Graph API. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-graph-migration
unrecognized arguments: --password XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Solution component

Deployment Script

Operating system (environment)

Windows

Additional Info

No response

@vtispijkerict thanks for raising this. I have now fixed this issue which was caused by changes to the Azure CLI. Please download the latest package. Thanks