How to Connect - MindBridge Documentation
Step 1: Generate an API Token from MindBridge
To authenticate with the API, you’ll need a Bearer token. How to generate it:
- Log into your MindBridge tenant.
- Navigate to Admin → API (Admins only).
- Click Generate New Token.
- Name it (e.g., “Power BI Integration”).
- Copy the token — it won’t be visible again.
Tokens can be revoked or rotated anytime from the same screen.
Step 2: Create a Parameter in Power BI for the Token
To securely reference the token in your queries:
- Open Power BI Desktop.
- Go to Transform Data → Manage Parameters → New Parameter.
- Use the following values:
- Name: apiToken
- Type: Text
- Current Value: Paste your token here — no “Bearer ” prefix
Security Notes
The token is stored in plain text within the .pbix file — limit access accordingly. For production or shared reports, publish to Power BI Service and configure a Gateway with securely stored credentials. For enterprise deployments, consider using Azure Key Vault integration to securely manage secrets (Power BI Premium feature).
Step 3: Create a Basic Test Query to Validate the Connection
This lightweight test will confirm that Power BI can connect to the MindBridge API.
- Go to Home → Transform Data.
- In the Power Query Editor, click Advanced Editor.
- Paste the following M code, but replace
yourcompanyin the URL with the subdomain of your own MindBridge tenant.
let
token = "Bearer " & apiToken,
url = "https://yourcompany.mindbridge.ai/api/v1/engagements/query?page=0&size=1",
response = Web.Contents(url, [\
Headers = [\
#"Authorization" = token,\
#"Content-Type" = "application/json"\
],\
Content = Text.ToBinary("{}")\
]),
json = Json.Document(response)
in
json
You should see a JSON response — typically one item or an empty content array — confirming the connection works.
Step 4: Set Authentication Method to Anonymous
To ensure Power BI uses your token rather than prompting for login:
- Go to File → Options and settings → Data source settings.
- Select or add your API domain (e.g.,
https://yourcompany.mindbridge.ai). - Click Edit Permissions.
- Set Authentication Method to Anonymous.
- Click OK.