This project is read-only.

Cannot create logins containing a hyphen (-).


You are able to create a SQL Azure login that contains a hyphen but you are unable to then create a database login using the same username. I believe this is due to the CREATE USER statement in code not enclosing the username within square brackets.


TysonNavarre wrote Sep 11, 2014 at 3:04 PM

I have the same problem with usernames with a "." in them.

wrote Sep 11, 2014 at 3:04 PM

wrote Sep 20, 2014 at 12:28 PM

JavedSaqib wrote Sep 20, 2014 at 12:29 PM

The fix is easy.

All places where the user name is uses, enclose with "[" and "]"

Example: DROP USER [" + username + "]"

ChristianPejrup wrote Feb 24, 2015 at 7:25 AM

I have submittet a codechange to address the issue with "-" i have not tested it for "." as that was not with in my scope, but as i just added the [ ] around the UserName and Login in the sql i think it will address both issues.

wrote Mar 11, 2015 at 10:36 AM