Ensure your Azure Functions stay supported and secure with these Azure CLI scripts, helping you identify and upgrade apps running on soon-to-be-retired or unsupported language versions.
Running Azure Functions on retired language versions can lead to security risks, performance issues, and potential service disruptions. While Azure Functions Team notifies users about upcoming retirements through the portal, emails, and warnings, identifying affected Function Apps across multiple subscriptions can be challenging.
To simplify this, we’ve provided Azure CLI scripts to help you:
✅ Identify all Function Apps using a specific runtime version
✅ Find apps running on unsupported or soon-to-be-retired versions
✅ Take proactive steps to upgrade and maintain a secure, supported environment
Read on for the full set of Azure CLI scripts and instructions on how to upgrade your apps today!
Why Upgrading Your Azure Functions Matters
Azure Functions supports six different programming languages, with new stack versions being introduced and older ones retired regularly. Staying on a supported language version is critical to ensure:
- Continued access to support and security updates
- Avoidance of performance degradation and unexpected failures
- Compliance with best practices for cloud reliability
Failure to upgrade can lead to security vulnerabilities, performance issues, and unsupported workloads that may eventually break. Azure's language support policy follows a structured deprecation timeline, which you can review here.
How Will You Know When a Version Is Nearing its End-of-Life?
The Azure Functions team communicates retirements well in advance through multiple channels:
- Azure Portal notifications
- Emails to subscription owners
- Warnings in client tools and Azure Portal UI when an app is running on a version that is either retired, or about to be retired in the next 6 months
- Official Azure Functions Supported Languages document here
To help you track these changes, we recommend reviewing the language version support timelines in the Azure Functions Supported Languages document.
However, identifying all affected apps across multiple subscriptions can be challenging. To simplify this process, I've built some Azure CLI scripts below that can help you list all impacted Function Apps in your environment.
Linux* Function Apps with their language stack versions:
az functionapp list --query "[?siteConfig.linuxFxVersion!=null && siteConfig.linuxFxVersion!=''].{Name:name, ResourceGroup:resourceGroup, OS:'Linux', LinuxFxVersion:siteConfig.linuxFxVersion}" --output table
*Running on Elastic Premium and App Service Plans
Linux* Function Apps on a specific language stack version: Ex: Node.js 18
az functionapp list --query "[?siteConfig.linuxFxVersion=='Node|18'].{Name:name, ResourceGroup:resourceGroup, OS: 'Linux', LinuxFxVersion:siteConfig.linuxFxVersion}" --output table
*Running on Elastic Premium and App Service Plans
Windows Function Apps only:
az functionapp list --query "[?!contains(kind, 'linux')].{Name:name, ResourceGroup:resourceGroup, OS:'Windows'}" --output table
Windows Function Apps with their language stack versions:
az functionapp list --query "[?!contains(kind, 'linux')].{name: name, resourceGroup: resourceGroup}" -o json | ConvertFrom-Json | ForEach-Object {
$appSettings = az functionapp config appsettings list -n $_.name -g $_.resourceGroup --query "[?name=='FUNCTIONS_WORKER_RUNTIME' || name=='WEBSITE_NODE_DEFAULT_VERSION']" -o json | ConvertFrom-Json
$siteConfig = az functionapp config show -n $_.name -g $_.resourceGroup --query "{powerShellVersion: powerShellVersion, netFrameworkVersion: netFrameworkVersion, javaVersion: javaVersion}" -o json | ConvertFrom-Json
$runtime = ($appSettings | Where-Object { $_.name -eq 'FUNCTIONS_WORKER_RUNTIME' }).value
$version = switch($runtime) {
'node' { ($appSettings | Where-Object { $_.name -eq 'WEBSITE_NODE_DEFAULT_VERSION' }).value }
'powershell' { $siteConfig.powerShellVersion }
'dotnet' { $siteConfig.netFrameworkVersion }
'java' { $siteConfig.javaVersion }
default { 'Unknown' }
}
[PSCustomObject]@{
Name = $_.name
ResourceGroup = $_.resourceGroup
OS = 'Windows'
Runtime = $runtime
Version = $version
}
} | Format-Table -AutoSize
Windows Function Apps running on Node.js runtime:
az functionapp list --query "[?!contains(kind, 'linux')].{name: name, resourceGroup: resourceGroup}" -o json | ConvertFrom-Json | ForEach-Object {
$appSettings = az functionapp config appsettings list -n $_.name -g $_.resourceGroup --query "[?name=='FUNCTIONS_WORKER_RUNTIME' || name=='WEBSITE_NODE_DEFAULT_VERSION']" -o json | ConvertFrom-Json
$runtime = ($appSettings | Where-Object { $_.name -eq 'FUNCTIONS_WORKER_RUNTIME' }).value
if ($runtime -eq 'node') {
$version = ($appSettings | Where-Object { $_.name -eq 'WEBSITE_NODE_DEFAULT_VERSION' }).value
[PSCustomObject]@{
Name = $_.name
ResourceGroup = $_.resourceGroup
OS = 'Windows'
Runtime = $runtime
Version = $version
}
}
} | Format-Table -AutoSize
Windows Function Apps running on a specific language version: Ex: Node.js 18
az functionapp list --query "[?!contains(kind, 'linux')].{name: name, resourceGroup: resourceGroup}" -o json | ConvertFrom-Json | ForEach-Object {
$appSettings = az functionapp config appsettings list -n $_.name -g $_.resourceGroup --query "[?name=='FUNCTIONS_WORKER_RUNTIME' || name=='WEBSITE_NODE_DEFAULT_VERSION']" -o json | ConvertFrom-Json
$runtime = ($appSettings | Where-Object { $_.name -eq 'FUNCTIONS_WORKER_RUNTIME' }).value
$nodeVersion = ($appSettings | Where-Object { $_.name -eq 'WEBSITE_NODE_DEFAULT_VERSION' }).value
if ($runtime -eq 'node' -and $nodeVersion -eq '~18') {
[PSCustomObject]@{
Name = $_.name
ResourceGroup = $_.resourceGroup
OS = 'Windows'
Runtime = $runtime
Version = $nodeVersion
}
}
} | Format-Table -AutoSize
All windows Apps running on unsupported language runtimes: (as of March 2025)
az functionapp list --query "[?!contains(kind, 'linux')].{name: name, resourceGroup: resourceGroup}" -o json | ConvertFrom-Json | ForEach-Object {
$appSettings = az functionapp config appsettings list -n $_.name -g $_.resourceGroup --query "[?name=='FUNCTIONS_WORKER_RUNTIME' || name=='WEBSITE_NODE_DEFAULT_VERSION']" -o json | ConvertFrom-Json
$siteConfig = az functionapp config show -n $_.name -g $_.resourceGroup --query "{powerShellVersion: powerShellVersion, netFrameworkVersion: netFrameworkVersion}" -o json | ConvertFrom-Json
$runtime = ($appSettings | Where-Object { $_.name -eq 'FUNCTIONS_WORKER_RUNTIME' }).value
$version = switch($runtime) {
'node' {
$nodeVer = ($appSettings | Where-Object { $_.name -eq 'WEBSITE_NODE_DEFAULT_VERSION' }).value
if ([string]::IsNullOrEmpty($nodeVer)) { 'Unknown' } else { $nodeVer }
}
'powershell' { $siteConfig.powerShellVersion }
'dotnet' { $siteConfig.netFrameworkVersion }
default { 'Unknown' }
}
# Check if runtime version is unsupported
$isUnsupported = switch($runtime) {
'node' {
$ver = $version -replace '~',''
[double]$ver -le 16
}
'powershell' {
$ver = $version -replace '~',''
[double]$ver -le 7.2
}
'dotnet' {
$ver = $siteConfig.netFrameworkVersion
$ver -notlike 'v7*' -and $ver -notlike 'v8*'
}
default { $false }
}
if ($isUnsupported) {
[PSCustomObject]@{
Name = $_.name
ResourceGroup = $_.resourceGroup
OS = 'Windows'
Runtime = $runtime
Version = $version
}
}
} | Format-Table -AutoSize
Take Action Now
By using these scripts, you can proactively identify and update Function Apps before they reach end-of-support status. Stay ahead of runtime retirements and ensure the reliability of your Function Apps.
For step-by-step instructions to upgrade your Function Apps, check out the Azure Functions Language version upgrade guide.
For more details on Azure Functions' language support lifecycle, visit the official documentation.
Have any questions? Let us know in the comments below!
Updated Mar 27, 2025
Version 1.0madhurabharadwaj
Microsoft
Joined June 15, 2019
Apps on Azure Blog
Follow this blog board to get notified when there's new activity