-1

I am able to create a new Azure App Service on my Azure subscription from VS code. If I then try to deploy my python web application to the App Service that I just created I get a "401 - Unauthorized: Access" error. If I logon to the Azure portal I can view my newly created App Service. I can see on the Access Control page that I am listed as a contributor. I am not sure why I can not deploy my code or view files. Does anyone have suggestions as to security settings to check? I need to be able to deploy my code. Thank you.

enter image description here

enter image description here

Bhargavi Annadevara
  • 4,923
  • 2
  • 13
  • 30
Kachopsticks
  • 125
  • 1
  • 13

1 Answers1

-1

@Kachopsticks, Apologies! If my response is to too late. To benefit the community, sharing the steps that could help isolate such issues:

There is a way to disable basic auth access to the WebDeploy port and SCM site with basicPublishingCredentialsPolicies, see if this is the case.

basicPublishingCredentialsPolicies --parent sites/ --set properties.allow=false

https://learn.microsoft.com/azure/app-service/deploy-configure-credentials?tabs=cli#webdeploy-and-scm

You could re-download the publish profile from Azure portal, and import publish settings in Visual Studio for deployment.

  1. In the Azure portal, open the Azure App Service.
  2. Go to Get publish profile and save the profile locally. A file with a .publishsettings file extension has been generated in the location where you saved it and you may import that in VS and then attempt to re-deploy.

Additionally, Azure App Service supports two types of credentials for local-Git and FTP/S deployment:

User-level credentials one set of credentials for the entire Azure account.

App-level credentials (one set of credentials for each app. It can be used to deploy to that app only) -. They can't be configured manually, but can be reset anytime. For a user to be granted access to app-level credentials via (RBAC), that user must be contributor or higher on the app (including Website Contributor built-in role). Readers are not allowed to publish, and can't access those credentials.

AjayKumar
  • 2,812
  • 1
  • 9
  • 28