Entity Framework Scaffold-DbContext Login failed for user Entity Framework Scaffold-DbContext Login failed for user azure azure

Entity Framework Scaffold-DbContext Login failed for user


I figured out my problem. My password contained the character $ and this needs to be escaped out by using ` before the $.


Change double quotes " for single quotes 'It is not necessary to add a escape character individually, it works for the rest of the parameters too.

Scaffold-DbContext 'Server=tcp:dbname.database.windows.net,1433;Initial Catalog=DBNAME_DB;Persist Security Info=False;User ID=username;Password=password;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;' Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models


Did you tried to update your web.config file for connection string. This might be a reason which doesn't allow you to login to azure.