0

I came across these two SQL Server catalog views today: sys.login_token and sys.user_token. The document states that they:

Returns one row for every server principal that is part of the login token.

and

Returns one row for every database principal that is part of the user token in SQL Server.

But what is a login token and a user token? I can't find any related information in the documentation. Could anyone help to explain a bit? Thanks.

1 Answer 1

2

A "token" in Kerberos or OAuth contains a list of the identities or "claims" that apply to a user. So by analogy these views were added to list the server principals (logins, windows groups, etc), and database principals (users, roles, etc) that apply to the current user's session.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.