sql server get list of users code example Example: sql server get users select * from master.sys.server_principals