Get-WebApp and the Azure REST API return a siteConfig object with null properties and is missing data

There seems to be a weird bug in the Azure AZ PowerShell API and the underlying REST API whereby when you list the App Services, also known as Web Apps, also known as Sites you find that the SiteConfig property contains null values and is generally missing information.


However if you run the Get-WebApp with the -ResourceGroupName and the -Name parameters the SiteConfig property is populated.



A similar issue is found when using the Azure REST API 

/subscriptions/subscription identifier/resourceGroups/resource group name/providers/Microsoft.Web/sites/web site name

The return value's properties.siteConfig is also missing information.

Using Fiddler to see how Get-WebApp is working - when you call with the -ResourceGroupName and -Name parameters the cmdlet is making multiple REST API calls and combining the information together.


From here we find that to get the SiteConfig information you can make a GET request to the REST API here

/subscriptions/subscription identifier/resourceGroups/resource group name/providers/Microsoft.Web/sites/web site name/config/web




Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Enable function lock for F1-F12 on HP ZBook mobile workstations