ALTER SECURITY POLICY
changes a security policy: FILTER predicates silently filter reads; BLOCK predicates reject writes
What changes
- Input
- predicate function (inline TVF) and target tables
- Output or change
- row-level security policy
Syntax at a glance
ALTER SECURITY POLICY schema_name.security_policy_name [ { ADD { FILTER | BLOCK } PREDICATE tvf_schema_name.security_predicate_function_name ( { column_name | arguments } [ , ...n ] ) ON table_schema_name.table_name [ <block_dml_operation> ] } | { ALTER { FILTER | BLOCK } PREDICATE tvf_schema_name.new_security_predicate_function_name ( { column_name | arguments } [ , ...n ] ) ON table_schema_name.table_name [ ...
Work example
A row-level security predicate needs a reviewed update or state change.
Test allowed and denied rows under each representative principal before changing the policy.
Check your work The policy blocks cross-tenant reads and writes for every test principal.
Open Microsoft Learn for full syntax, permissions, and details for your version.