I want to configured Azure AD Authentication on an existing MVC website. So I right-click the website in Visual Studio, and select "Configure Azure AD Authentication".
The wizard then says: "An incompatible authentication configuration was found in this project (Windows Authentication). The wizard cannot be used to configure authentication."
It even links me to the documentation page explaining the error. So I removed <authentication mode="Windows" />
from web.config and re-built the application. But the wizards keeps showing this message.
What needs to change so the wizard will proceed?
The authentication assistant checks for both authentication section and a line that indicates to use Windows authentication with IISExpress, in the .csproj directly:
Make sure to remove all authentication nodes in the web.config. Then unload your project (right click unload, in the solution explorer). Edit the project file (right click, Edit, once unloaded) and mark IISExpressWindowsAuthentication as disabled:
Reload your project, rebuild and then reopen the AD Authentication assistant.
It should work now :)