Listing Azure Function Apps Framework Version

Scenario Link to heading

Azure Function Apps running with .NET 3.1 will go out of support on Dec 3 2022, something that the Azure Portal reminds users every time they visit their outdated functions. If like me, you have several functions, whouldn’t it be nice to be able to get a list of all the functions that should be updated?

Solution Link to heading

A simple az functionapps list should do the trick, however the properties that provide this information are in one of the objects, siteConfig, which is not populated by the list command, and after searching for a while I found this solution for WebApps, the command for Function Apps is

az functionapp list --query '[].id' -o tsv | xargs | xargs -I{} bash -c "az functionapp config show --ids {} --query '[].[name, resourceGroup,linuxFxVersion, netFrameworkVersion]' --out table"

This command will list all the functions in the current subscription, provided proper permissions.

The output looks like this:

Column1 Column2 Column3 Column4
tseries-urban-cars cars-classifier DOTNET|6.0 v6.0
tseries-urban-buildings buildings-location v4.0
tseries-urban-weapons weapons-catalog DOTNET|6.0 v6.0
targets targets-catalog DOTNET|3.1 v4.0

Rows 1 and 3 were updated already, row 2 is not .NET, and the last needs to be updated