Skip to content

Commit

Permalink
docs: add documentation for new optional parameter of GetEmbedInfo az…
Browse files Browse the repository at this point in the history
…ure function
  • Loading branch information
csm-thu committed May 11, 2023
1 parent 86d1229 commit 413ae44
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions doc/powerBI.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,21 +628,25 @@ instance. Open the "_Configuration_" blade
(_Azure Portal_ > _Static Web Apps_ > _[name of your webapp]_ > _Configuration_), and add the environment variables
below:

| Parameter name | Value description |
| ------------------------ | -------------------------------------------------------------------------- |
| `POWER_BI_SCOPE` | "https://analysis.windows.net/powerbi/api/.default" |
| `POWER_BI_CLIENT_ID` | client id of the webapp app registration (visible in the _Overview_ blade) |
| `POWER_BI_WORKSPACE_ID` | id of the Power BI workspace containing your reports |
| `POWER_BI_AUTHORITY_URI` | "https://login.microsoftonline.com/common/v2.0" |
| `POWER_BI_CLIENT_SECRET` | a client secret generated in your app registration for PowerBI |
| `POWER_BI_TENANT_ID` | tenant id of your app registration (visible in the _Overview_ blade) |
| Parameter name | Value description |
| ------------------------ | ------------------------------------------------------------------------------------- |
| `POWER_BI_SCOPE` | "https://analysis.windows.net/powerbi/api/.default" |
| `POWER_BI_CLIENT_ID` | client id of the webapp app registration (visible in the _Overview_ blade) |
| `POWER_BI_WORKSPACE_ID` | id of the Power BI workspace containing your reports |
| `POWER_BI_AUTHORITY_URI` | "https://login.microsoftonline.com/common/v2.0" |
| `POWER_BI_CLIENT_SECRET` | a client secret generated in your app registration for PowerBI |
| `POWER_BI_TENANT_ID` | tenant id of your app registration (visible in the _Overview_ blade) |
| `CSM_API_TOKEN_AUDIENCE` | (optional) if defined, queries whose token don't match this audience will be rejected |

The value for `POWER_BI_WORKSPACE_ID` can be found in the PowerBI service URL: when your report is opened, the workspace
id is visible after `/groups/` in the URL (e.g. "https://app.powerbi.com/groups/YOUR_WORKSPACE_ID/").

For `POWER_BI_CLIENT_SECRET`, you can create a new client secret from
_Azure Portal_ > _App Registrations_ > _[name of your webapp app registration]_ > _Certificates & secrets_.

`CSM_API_TOKEN_AUDIENCE` is optional but strongly recommended. It increases security by checking the audience field in
the user access token. The expected value is the **application id** of the Cosmo Tech API enterprise application.

#### Azure Function configuration for local run

If you want to run the Azure Function locally to visualize the embedded dashboards from a local webapp, you first need
Expand All @@ -660,7 +664,8 @@ JSON file. Create a _**local.settings.json**_ file in the **api** folder with th
"POWER_BI_WORKSPACE_ID": "INSERT POWER BI WORKSPACE ID HERE",
"POWER_BI_AUTHORITY_URI": "https://login.microsoftonline.com/common/v2.0",
"POWER_BI_CLIENT_SECRET": "INSERT CLIENT SECRET HERE",
"POWER_BI_TENANT_ID": "INSERT TENANT ID HERE"
"POWER_BI_TENANT_ID": "INSERT TENANT ID HERE",
"CSM_API_TOKEN_AUDIENCE": "INSERT EXPECTED TOKEN AUDIENCE HERE"
}
}
```
Expand Down

0 comments on commit 413ae44

Please sign in to comment.