unable to deploy to azure web app services

Viewed 1427

I am experiencing a weird error when trying to build a continous pipeline build from github to azure app services. Ive done deploys before from other accounts and they work just fine, the difference between those accounts and this one is its a personal account and its on a free-tier. the others are not. but still i am receiving an unathorized error

Run azure/webapps-deploy@v2
  with:
    app-name: contactKeeper
    slot-name: Production
    publish-profile: ***
    package: .
Package deployment using ZIP Deploy initiated.
Error: Failed to deploy web package to App Service.
Error: Deployment Failed with Error: Error: Failed to deploy web package to App Service.
Unauthorized (CODE: 401)
App Service Application URL: http://contactkeeper.azurewebsites.net

Does anyone know why i am receiving this issue?

2 Answers

Thank you vincent1173 posting your suggestion as an answer to help other community members.

Error: Deployment Failed with Error: Error: Failed to deploy web package to App Service. Unauthorized (CODE: 401)

For this error , you can try to set an application setting WEBSITE_WEBDEPLOY_USE_SCM and value true in Azure Portal and retry the deployment after 1 min.

Here is the step : Go to Azure portal>App service> Configuration> Add application setting and save it.

enter image description here

For more information please refer this Microsoft Documentation : Deploy an Azure Web App

The only thing I can think of is the reason for this issue, was, i was hitting some kind of wall with the amount of app resources i was using, i used a paid subscription tier in a different account and was able to successfully deploy the app to that location. the app still returns this error if i try to deploy it to the free tiered account.

the answer: Upgrade from a base free tier to a pay tiered.

Related