Class SecuritySchema.UserToken
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.user_token (Transact-SQL)
APPLIES TO: (Yes) SQL Server (Yes) Azure SQL Database (Yes) Azure Synapse Analytics (No) Parallel Data Warehouse
Returns one row for every database principal that is part of the user token in SQL Server.
See sys.user_token.
[Table(Schema = "sys", Name = "user_token", IsView = true)]
public class SecuritySchema.UserToken
- Inheritance
-
SecuritySchema.UserToken
- Extension Methods
Properties
Name
Name of the principal. The value is unique within database.
[Column("name")]
[Nullable]
public object? Name { get; set; }
Property Value
PrincipalID
ID of the principal. The value is unique within database.
[Column("principal_id")]
[Nullable]
public int? PrincipalID { get; set; }
Property Value
- int?
SID
Security identifier of the principal if the principal is defined external to the database. For example, this can be a SQL Server login, Windows login, Windows Group login, or a login mapped to a certificate, otherwise, this value is NULL.
[Column("sid")]
[Nullable]
public byte[]? SID { get; set; }
Property Value
- byte[]
TypeColumn
Description of principal type. All types are mapped to sid. The value can be one of the following:
SQL USER
WINDOWS LOGIN
WINDOWS GROUP
ROLE
APPLICATION ROLE
DATABASE ROLE
USER MAPPED TO CERTIFICATE
USER MAPPED TO ASYMMETRIC KEY
CERTIFICATE
ASYMMETRIC KEY
[Column("type")]
[Nullable]
public object? TypeColumn { get; set; }
Property Value
Usage
Indicates the principal participates in the evaluation of GRANT or DENY permissions, or serves as an authenticator.
This value can be one of the following:
GRANT OR DENY
DENY ONLY
AUTHENTICATOR
[Column("usage")]
[Nullable]
public object? Usage { get; set; }