Create Windows Authentication Login

DBA Learning Hub Feb 2026 Create Windows ...
Back to SQL Server Articles

How to create Windows Authentication Login in SQL Server


1. Prerequisites

The user must be exist in Active Directory




2. Using SSMS (GUI)

























3. Using T-SQL

USE [master]
GO
CREATE LOGIN [SQL\david] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO



Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.