Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer
Turn on or turn off a table's row_level_security policy. The Row Level Security simplifies the design and coding of security. It lets you apply restrictions on data row access in your application. For example, limit user access to rows relevant to their department, or restrict customer access to only the data relevant to their company.
Note
Even when the policy is disabled, you can force it to apply to a single query. Enter the following line before the query:
set query_force_row_level_security;
This is useful if you want to try various queries for row_level_security, but don’t want it to actually take effect on users. Once you’re confident in the query, turn on the policy.
For more information about running queries on the row level security policy, see row_level_security policy.
You must have at least Table Admin permissions to run this command.
.alter
table
TableName policy
row_level_security
[enable
| disable
] Query
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
TableName | string |
✔️ | The name of the table. |
Query | string |
✔️ | The query to run. For more information, see row_level_security policy. |
.alter table MyTable policy row_level_security enable "AnonymizeSensitiveData"
.alter table MyTable policy row_level_security disable "AnonymizeSensitiveData"