I am currently trying to use the Azure CLI to list the Function Apps and segregate them based on the security they are set up with.
If the app is set up with "Client Certificates" mechanism then it is being listed using the "az cli" functionapp commands. But, unable to figure out how to determine if the function app is secured with "OAuth" mechanism or not.
Is this something that is not directly available using the functionapp commands?
2
Answers
To determine if an Azure Function App is secured with OAuth, you can use the Azure CLI command
az functionapp auth show
which will show the authentication settings for the function app. If OAuth is being used, it will be listed under the "Enabled Providers" section.Here’s an example command to list the authentication settings for a specific function app:
If OAuth is being used, it will be listed under the "Enabled Providers" section.
Check below Ref.
Authentication types by deployment methods in Azure App Service
Azure CLI conceptual article list (ref-zone3)
You can check if Authorization is enabled by checking if Enabled is True for the following output:
This works for both Web Apps and Function Apps.
If you want to loop through all the App Services in a particular Resource Group: