Azure PaaS deployment issue with Set-AzWebApp

During an Azure PaaS upgrade when running the Publish-IdentityServer.ps1, an error occurs when calling the AzureDeployUtils.ps1 script with line 228: $app = Set-AzWebApp

Issue Description

During an Azure PaaS upgrade when running the Publish-IdentityServer.ps1, an error occurs when calling the AzureDeployUtils.ps1 script with line 228: $app = Set-AzWebApp.

The error is Operation returned an invalid status code 'BadRequest'.

Resolution

After careful deliberation and testing, turns out that you can comment that line of code out of the script because it does not interfere with the installation and can safely be commented out.