run_dax_as_role
Run a DAX query as a security role to get row-level filtered rows, with optional effective user for dynamic RLS, validating roles to avoid unfiltered access. Read-only.
Instructions
Run a DAX query AS a security role: opens a second connection to the session's engine with Roles= (and optionally EffectiveUserName= for dynamic USERPRINCIPALNAME-driven RLS) so the engine applies the role's row-level filters, and returns the rows. Role names are validated against the model so a typo can never silently run unfiltered. Read-only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"query": "<query>",
"roles": "<roles>"
},
"name": "run_dax_as_role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | the DAX query (bare table expressions get EVALUATE prefixed) | |
| roles | Yes | role names, comma-separated (all applied together, as AS unions role filters) | |
| maxRows | No | max rows to return (default 200) | |
| sessionId | Yes | ||
| effectiveUserName | No | impersonated UPN for dynamic RLS, e.g. user@contoso.com (optional) |