SQL Flow Field Guide

CERTENCODED

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

security context lookup

What changes

Input
security context (login, user, roles, permissions)
Output or change
name, id or boolean
Return type
varbinary

Syntax at a glance

CERTENCODED ( cert_id )

Work example

Read the public encoded certificate for an existing trust or exchange workflow.

Test under the intended execution context. Use GRANT and DENY rather than returned identity text.

Check your work Verify certificate identity and chain before trusting its public key.

Open Microsoft Learn for full syntax, permissions, and details for your version.