DEV Community

Cover image for ERROR_USER_UNAUTHORIZED error using publish profile in App Service
Massimo Bonanni
Massimo Bonanni

Posted on

ERROR_USER_UNAUTHORIZED error using publish profile in App Service

If you try to publish an App Service using the Publish Profile and you receive the ERROR_USER_UNAUTHORIZED error, you need to enable the Basic Authentication on App Service to solve it.

You can receive this error, for example, if you are deploying your App Service using Visual Studio.
You create the Publish Profile in Visual Studio with the Publish menu:

The Publish menu in Visual Studio

This Visual Studio feature, behind the scene, use the Publish Profile of the App Service to deploy your code.
Up until a couple of weeks ago, the Basic authentication in App Service was active by default and this always allowed this option to be used without errors. For a couple of weeks now, if you create an App Service from the Azure portal and try to do this type of publication, you get the following error:

The publish error in Visual Studio

This happens because the Basic Authentication is, now, disable by default.
If you want to continue to deploy your app using this way, you need to open the Configuration blade of your App Service, click on the General settings tab and enable the Basic Authentication option.

The Basic Authentication option in the App Service configuration blade

This configuration should solve your problem.

Top comments (0)