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

Yaju Patel 10 Reputation points


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 ("") 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: 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.
4,873 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Phil Crompton 57 Reputation points

    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.



    Hope this helps someone.

    6 people found this answer helpful.

  2. Abhishek Tiwari 0 Reputation points Microsoft Employee

    @Divya Ghai 's answer to check through Configuration settings for FTP state: also helped. Thanks to @Phil Crompton 's answer as well!

    0 comments No comments