Convert from database authentication to custom

Convert from database authentication to custom

avatar

We want to switch from using the "Database" type of authentication (along with Integrated Security) to the more secure "Custom" type. Is there any way to convert existing users from one to the other? (without losing the private vaults)

All Comments (1)

avatar

There is a possible, non-documented method you could use.

AS-IS-NOT-FULLY-TESTED

BACKUP your database before trying this. You might want to test on a staging environment first.

  • CTRL + Edit the user
    • this will enable the "Authentication Type" drop down
    • Change it to Custom
    • OK
  • Rename the user using the Rename Login button
    • remove the domain for example
  • Click the "Change Password" and set a password
  • The user should be able to login using Custom auth


NOTE: this will not delete the integrated SQL Login for this user, you will need to do that manually via SSMS (SQL Server Management Studio)

USE [master]
GO

DROP LOGIN [yourdomain\username]
GO

and

USE [your-database-name]
GO

DROP USER [yourdomain\username]
GO

Stéfane Lavergne