Search notes:

SQL Server - sys.server_principals

sys.server_principals lists the (server-)logins. Database users are not found in this view, they're found in database_principals
The column default_database_name shows a login's default database.

Columns principal_id and sid

The values of principal_id and sid identify the principal. These can be converted to the principal's name with suser_name and suser_sname, respectively:
select
   name,
   suser_name(principal_id),
   suser_sname(sid)
from
   sys.server_principals
If the principal corresponds to a Windows user, the value of sid is equal this user's security identifier.

See also

database_principals, sys.login_token, sys.sql_logins, sys.syslogins
The sys schema
SQL Server: login
prinicipal
sys.server_principals selects from the sys.sysxlgns system base table.

Index