Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attempt to publish the ZIP file through Azure Function App Site URL failed with HTTP status code Unauthorized

I have created an Azure Function in VS 2019 and want to deploy it from VS 2019. While trying to deploy I am getting below error: The attempt to publish the ZIP file through failed with HTTP status code Unauthorized. I have tried following options:

  1. Created Function App from portal and then publish the Function project from VS2019
  2. Created the Function App from VS2019 and trying to publish the function

None of the options is working. I am always getting same UNAUTHORIZED error.

like image 308
Data Dad Avatar asked Dec 01 '25 01:12

Data Dad


1 Answers

I was facing the same failure when trying to publish a .NET Azure Function app from Visual Studio and I discovered that the Deploy ZIP file with REST APIs requires basic authentication to be turned on. So, in the Azure Portal for your Azure Function app go to Configuration and then to General Settings and turn on basic authentication.

enter image description here

One last thing, you might need to restart the app for the configuration change to take place.

like image 197
whatever Avatar answered Dec 05 '25 06:12

whatever



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!