question

Mark-8704 avatar image
0 Votes"
Mark-8704 asked shkumesh commented

Cannot deploy to app service deployment slot with private endpoint using azure pipeline. 401 error

I have an app service with a production (default) and test slot, and each slot has a private endpoint preventing public access to the apps. I'm able to use an azure pipeline to deploy to the production slot but I receive a 401 error when trying to deploy to the test slot. To deploy to the production slot, I had to add an application variable WEBSITE_WEBDEPLOY_USE_SCM=false to the app service's Configuration. The test slot has the same app variable set to false. The service connection for the pipeline to connect to the app has Contributor permissions. Is there something else that's missing?

Error: Error Code: ERROR_USER_UNAUTHORIZED
Error: The remote server returned an error: (401) Unauthorized.

azure-webapps
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for asking question! Could you please try to set an application setting WEBSITE_WEBDEPLOY_USE_SCM to value true in Azure Portal and retry the deployment after 1 min. Also, try choosing Zip Deploy or Website Run From Package as deployment method.
Check this link: https://github.com/Microsoft/azure-pipelines-tasks/wiki/Migrating-from-Web-Deploy-to-Run-From-Package-deployment-mechanism

Let us know if issue remains.

0 Votes 0 ·

After migrating the azure pipeline to use Run from Package, I'm seeing a 403 error. This is odd because for the production slot with a private endpoint, this pipeline works but for my "test" slot with a private endpoint, this still doesn't work.

Error: Failed to fetch Kudu App Settings. Error: Ip Forbidden (CODE: 403)

0 Votes 0 ·

We are having the same issue. Still could not find a solution to this

0 Votes 0 ·

0 Answers