Hello @Momo Jeng
This issue could be caused by a few different factors, such as a misconfiguration in your Azure Function App or a problem with your Visual Studio installation.
However, one possible solution is to try enabling Basic Authentication for your Function App through the Azure Portal. Here are the steps to do so:
- Go to the Azure Portal and navigate to your Function App.
- Under Settings, select "Authentication / Authorization".
- Toggle "App Service Authentication" to On.
- Under "Action to take when request is not authenticated", select "Log in with Azure Active Directory".
- Save your changes. After enabling Basic Authentication through the Azure Portal, try publishing your Function App again from Visual Studio.