Not able to publish to Azure app service getting the error : Error ERROR_USER_UNAUTHORIZED

Yaju Patel 15 Reputation points
2023-05-15T09:48:19.1633333+00:00

Hi,

i am trying to publish a very simple app to Azure app service but i keep getting the below error :

I use a MS work account to sign into Visual Studio. I am getting this issue with 2019 and 2022 versions. As its a Azure active directory user, i am able to login in to azure portal from this use and other services as well. I am not which account to use and how to authenticate, other than using the WORK account .

Severity Code Description Project File Line Suppression State

Error Web deployment task failed. (Connected to the remote computer ("wafdemo212.scm.azurewebsites.net") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.) WAFSQLDemo 0

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,173 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Phil Crompton 72 Reputation points
    2023-05-15T19:37:11.2966667+00:00

    I found the answer in my case. I had set up VS 2022 and my solution on a new machine. The fix was to get the FTPS password from the Azure App Service portal. Once I pasted this into the connection settings for the web deploy it worked.

    2023-05-15_17-01-49

    2023-05-15_20-32-33

    Hope this helps someone.

    8 people found this answer helpful.

  2. Abhishek Tiwari 0 Reputation points Microsoft Employee
    2023-09-20T19:20:39.42+00:00

    @Divya Ghai 's answer to check through Configuration settings for FTP state: https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp?tabs=portal also helped. Thanks to @Phil Crompton 's answer as well!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.