If we are not logged into Azure then 'azd up' fails with: [ERROR] Not logged in to Azure. Run 'azd auth login'
I ran 'azd auth login', logged in, same error.
I verified my 'azd auth status' which returned 'Logged into Azure as @'
The instructions to resolve are incorrect. preprovision.ps1 is calling 'az account show' but advising to login to azd.
deployment/hooks/preprovision.ps1 [line 20-24]
$account = az account show 2>$null | ConvertFrom-Json
if (-not $account) {
Write-Host "[ERROR] Not logged in to Azure. Run 'azd auth login'" -ForegroundColor Red
exit 1
}
Realised this should say:
Write-Host "[ERROR] Not logged in to Azure. Run 'az login'" -ForegroundColor Red
Ran that and voila.
If we are not logged into Azure then 'azd up' fails with: [ERROR] Not logged in to Azure. Run 'azd auth login'
I ran 'azd auth login', logged in, same error.
I verified my 'azd auth status' which returned 'Logged into Azure as @'
The instructions to resolve are incorrect. preprovision.ps1 is calling 'az account show' but advising to login to azd.
deployment/hooks/preprovision.ps1 [line 20-24]
$account = az account show 2>$null | ConvertFrom-Json
if (-not $account) {
Write-Host "[ERROR] Not logged in to Azure. Run 'azd auth login'" -ForegroundColor Red
exit 1
}
Realised this should say:
Write-Host "[ERROR] Not logged in to Azure. Run 'az login'" -ForegroundColor Red
Ran that and voila.