I am trying to create a SQL Server login user and a database user from my application along with the user application user line. I want these users to be able to create other users, that is, the application will control who can / cannot create users, but I need all the users to have permissions to create SQL Server logins and database users.
I have access rights to the server - i.e. an existing user / login can create a new login - adding logins to the server role "securityadmin", which grants the privilege "ALTER ANY LOGIN".
I tried to do the same with database users - adding them to the db_accessadmin database role, which supposedly grants the ALTER ANY USER privilege, which is required for CREATE USER.
However, whenever I try to create a new database user using a user with the above privileges, I get a permission exception.
I tried to manually grant the user ALTER ANY USER permission for a specific user (GRANT ALTER ANY USER TO demouser), but this also does not work.
Ben jones
source share