11

I was able to publish my Function from Visual Studio 2 weeks ago. I made a minor change went to publish and received this error.

The attempt to publish the ZIP file through https://xxxxxxxxxxx.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code Unauthorized.

Any ideas, I know the 2022 VS was upgraded to a new version last week.

1
  • Did you try enabling Basic Authentication in function app? Commented Feb 16, 2024 at 11:12

3 Answers 3

14
  • Remove the existing publish profile.

enter image description here

  • Create a new publish profile and deploy the function app again.
  • Enable the Basic Authentication in Azure Portal=>Function App=>Settings=>Configuration=>General Settings before deploying the function:

enter image description here

  • I have created and deployed a Http Triggered function to Azure.

Application Settings of my function app:

enter image description here

  • Created a publish profile to Zip Deploy the function to .NET Azure function app.

enter image description here

Portal:

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Only turning SCM Basic Auth to ON fixed the problem for me
2

I was getting this error but was able to successfully deploy in vscode.

In vscode I needed all the Azure tool extensions installed, which makes it all very seamless.

I followed @PravallikaKV 's answer but still couldn't get it working in the latest version of Visual Studio.

Comments

1

In my case my Azure DevOps service connector was in a particular virtual network, and my application needed to be added to that virtual network.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.