Entity Framework Scaffold-DbContext Login failed for user

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

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