Connect directly to Power BI
Sign in with Microsoft and let Denframe run one fixed DAX query on a schedule.
Two private values from one semantic model, Revenue and Attainment, each in its own Custom block and refreshed every 15 minutes.
- A tenant-specific, organization-approved app registration and a semantic model you can query.
- A host configured with a separate Power BI encryption key. An administrator must set this up before sign-in is available.
- Organization policy that permits delegated device-code sign-in. Live tenant and unattended-refresh validation remain deployment-specific.
Follow these steps in your own Denframe. This website never connects to your household, your accounts or your devices, and never asks for your credentials.
Administrator: prepare Microsoft access
In Microsoft Entra app registrations, create or select the approved app. Copy its Directory (tenant) ID and Application (client) ID.
Enable public-client device-code authentication. Add the Power BI Service delegated
Dataset.Read.Allpermission and complete the consent your organization requires. This delegated flow doesn’t use an application client secret.Have the Power BI administrator enable Execute Queries for the tenant and give the signing-in user read and build access to the target semantic model. Copy the semantic model’s dataset ID; don’t use a report or workspace ID.
Administrator: set the encryption key
Generate a Fernet key with the command below, in a Python environment that has the
cryptographypackage. Store it asDENFRAME_POWER_BI_CACHE_KEYin the host’s protected startup environment, separate from its database and backups, then restart Denframe. Without a valid key, Denframe refuses direct sign-in.Generate a key with Python and cryptography python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"Don’t paste the key into source settings or the website. Keep it stable across restarts: losing or changing it means reconnecting every Power BI source.
Sign in with Microsoft
In Studio, open Sources, then Custom. Choose Add a custom source; the sheet asks where the data comes from.
Choose Power BI · Connect directly. Enter Tenant ID and Application (client) ID, keep Microsoft authentication on My Microsoft account, and choose Sign in with Microsoft.
Open Microsoft device sign-in and enter the code Denframe shows. Enter Microsoft credentials only on Microsoft’s site.
Back in Denframe, choose I've finished signing in and wait for the sheet to say which account is signed in.
Advanced: service-principal access
Instead of a person’s account, an app’s own credential can sign in. Before choosing Sign in with Microsoft, select Service principal (advanced) under Microsoft authentication and enter the secret in Application client secret; there is no device code, and the sheet says it is signed in as Service principal. Use it only when your tenant permits it and the model is eligible.
Models using RLS or SSO are not supported in this mode. Don’t use a manually copied, short-lived access token as a permanent HTTP source credential.
Test a saved query
Enter Semantic model (dataset) ID and put the synthetic query below in Saved DAX query. Set Check every (seconds) to
900, then choose Test saved query. It should return one row with Revenue 124500 and AttainmentPct 83.First query · DAX EVALUATE ROW("Revenue", 124500, "AttainmentPct", 83)When ready, replace the constants with your model’s measures, for example
EVALUATE ROW("Revenue", [Total Revenue], "AttainmentPct", [Attainment Percent]), and test again. The measure names must exist and the attainment measure must return the intended 0–100 scale.Map the result
Edit the first value and choose Add another value for the second, using these paths. Keep the brackets around the returned column names.
Value Field path Settings Revenue /results/0/tables/0/rows/0/[Revenue]Metric; unit EUR; Hero number Attainment /results/0/tables/0/rows/0/[AttainmentPct]Range; unit %; 0 to 100; Bars Keep Visibility on Private unless the intended audience permits another choice.
Preview and add it to a dashboard
Choose Preview selected values. Check the values match the query test. Pick the value in Value to show and look at it in both TV 16:9 and Portrait.
Under Show on, tick an eligible dashboard and choose Add source. If you started from a Custom block selected in Studio, that exact block is updated; otherwise the connection adds a new block.
To show the second value, add or select another Custom block in Studio and choose this existing source and its other value. The first block keeps its own value.
A dashboard’s audience must permit the value you attach. Denframe never broadens the audience for you; change it in Studio first if the value is hidden.
Check it worked
Both blocks show their values on the dashboard. After a host restart, check that updates continue unattended in your test deployment.
If consent or model access is revoked, Denframe turns the source off. Open the source, choose Edit or reconnect Microsoft, sign in, test and save again; saving turns it back on.
If it doesn’t work
Sign-in is unavailable
Set a valid DENFRAME_POWER_BI_CACHE_KEY in the process that runs the host, then restart it.
Your organization blocks device code
Ask for an approved deployment route or use Power Automate. Don’t bypass conditional-access policy.
Query test fails
Check the dataset ID, user access, tenant policy and exact DAX. Denframe rejects embedded query errors even in HTTP 200 responses; keep the result to one small table under 128 KiB.
Preview hidden on the target dashboard
Choose an appropriate dashboard audience in Studio; Private values don’t change it automatically.