Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

az cli webapp list not returning the netFrameworkVersion #28319

Open ilmax opened 9 months ago

ilmax commented 9 months ago

Describe the bug

I'm unable to have an overview of the current framework version for all the webapps in a given subscription. The script below always return null for such property. It works correctly when I use az webapp show -n {name} -g {rg} --query "[name, siteConfig.netFrameworkVersion]"

Related command

az webapp list --query "[].{name:name, version:siteConfig.netFrameworkVersion}"

Errors

N/A

Issue script & Debug output

N/A

Expected behavior

Return name and dotnet version of the website

Environment Summary

azure-cli                         2.57.0

core                              2.57.0
telemetry                          1.1.0

Extensions:
application-insights              0.1.19
automation                         0.2.1
azure-devops                      0.26.0
datafactory                        0.7.0
ssh                                2.0.2

Dependencies:
msal                              1.26.0
azure-mgmt-resource             23.1.0b2

Additional context

No response

yonzhan commented 9 months ago

Thank you for opening this issue, we will look into it.

kimjamia commented 9 months ago

This also applies to functionapp, e.g. az functionapp list --query "[].[name,siteConfig.linuxFxVersion,siteConfig.netFrameworkVersion]" --output table. The column for netFrameworkVersion is empty while az functionapp show -n xyz --query "siteConfig.netFrameworkVersion" --output table shows the value.

ilmax commented 5 months ago

@yonzhan hello there, any news here? We're approaching the 6 months mark and this is still broken

masoodishaq commented 3 months ago

any update on this. having same issue.

npiasecki commented 1 month ago

Apparently for performance reasons siteConfig is not returned in the list call, even though the most useful properties are there. Given that the linked bug is from 2022, I don't think it will ever be fixed.

For example, I wanted to know if any apps were still using TLS 1.0. In Bash, I finally got it with this mess, which basically gets a list of webapps and then calls show on each one of them individually to get access to the siteConfig.

az webapp list --query '[].id' -o tsv | xargs | xargs -I{} bash -c "az webapp show --ids {} --query '[].{Name:name,ResourceGroup:resourceGroup,Tls:siteConfig.minTlsVersion}'"

Hope this helps.