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.
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) |