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:
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:
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.
This configuration should solve your problem.