LOGINPROPERTY
security context lookup
What changes
- Input
- security context (login, user, roles, permissions)
- Output or change
- name, id or boolean
Syntax at a glance
LOGINPROPERTY ( 'login_name' , 'property_name' )
Work example
Inspect a documented SQL Server login property for administration review.
Test under the intended execution context. Use GRANT and DENY rather than returned identity text.
Check your work Restrict output because login policy and lockout metadata are sensitive.
Open Microsoft Learn for full syntax, permissions, and details for your version.