Forum Discussion

DiKi-I's avatar
DiKi-I
Post Partisan
10 months ago
Solved

multiple workspace power bi deployment

We are building multiple customer solution. Each customer has its own mirror db in workspace. How I can craete a template use it across multilple customer and do automatic parmeter binding for each workspace?


  • Hi DiKi-I,

     

    You’re essentially describing a classic multi-tenant pattern in Power BI/Fabric: one “golden” solution reused across many customer workspaces, each bound to its own mirrored database. There are two solid ways to do this-one for cross-tenant distribution and one for many workspaces inside your tenant.

     

    • If these customers are in other tenants: build a Template App and parameterize your connections. Each customer fills in their own server/DB (or Fabric item) at install. See Create template apps.
    • If these customers are in your tenant (one workspace per customer): use a “golden” workspace + Deployment Pipeline rules (Parameter Rules, Data Source Rules, and Default Lakehouse Rules) to auto-bind each stage/workspace to the right mirror. See Create deployment rules and Get started with deployment pipelines.

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

  • Hi DiKi-I ,

    A Power BI Template file (.PBIT) is a reusable report structure that allows for dynamic parameter values when the report is opened.

    Steps:

    Create the Power BI Report: Build a report in Power BI that includes dynamic parameters, such as customer ID, workspace ID, etc.

    Define Parameters: Set up the parameters either in the Power Query Editor or Power BI Desktop, ensuring they can be adjusted as needed.

    Save as .PBIT: Save the report as a .PBIT (Power BI Template) file. This template can then be programmatically modified to reflect the specific parameters for each customer, ensuring they see only their relevant data when the report is opened.

    Reference: Create template apps in Power BI - Power BI | Microsoft Learn

     

    Thank you.

  • Hi, I highly recommend looking to work with the fabric-cicd Python library if you are looking to do the automatic rebinding when deploying to another workspace:

    https://microsoft.github.io/fabric-cicd/0.1.29/

    Here's a link to an example Git repository that you can use with a YAML pipeline in Azure DevOps that can help you get started:
    https://github.com/kevchant/AzureDevOps-fabric-cicd-sample 

    If this answers your question please give kudos and/or accept as solution.

9 Replies

  • Hi DiKi-I,

     

    You’re essentially describing a classic multi-tenant pattern in Power BI/Fabric: one “golden” solution reused across many customer workspaces, each bound to its own mirrored database. There are two solid ways to do this-one for cross-tenant distribution and one for many workspaces inside your tenant.

     

    • If these customers are in other tenants: build a Template App and parameterize your connections. Each customer fills in their own server/DB (or Fabric item) at install. See Create template apps.
    • If these customers are in your tenant (one workspace per customer): use a “golden” workspace + Deployment Pipeline rules (Parameter Rules, Data Source Rules, and Default Lakehouse Rules) to auto-bind each stage/workspace to the right mirror. See Create deployment rules and Get started with deployment pipelines.

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

    • DiKi-I's avatar
      DiKi-I
      Post Partisan

      The no of customers will grow in the future, so using deployment pipeline is not a feasible solution. Is there a way to autobind the power bi report parameter as per the customer workpsace?

  • Hi DiKi-I 

     

    Please check ...

    1. Microsoft Fabric Community – Deploying Reports to Multiple Workspaces
      This thread discusses using Power BI REST API and deployment pipelines to automate report publishing and parameter updates across workspaces.
      Read the full discussion

    2. Richard Swinbank – Working with Multiple Power BI Dataset Environments
      A deep dive into managing datasets and reports across environments using Azure DevOps pipelines and parameterized workflows.
      Explore the workflow and pipeline setup

    3. Stack Overflow – Dynamic Dataset Binding in Embedded Power BI
      Explains how to use the Power BI REST API to generate tokens and dynamically bind datasets across workspaces.
      View the API usage and embed config


    Regards,

    Ritesh

    Community Champion

    Please mark the answer if helpful so that it can help others

    Dance-Sing with Data -BI & Analytics

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi DiKi-I ,

    A Power BI Template file (.PBIT) is a reusable report structure that allows for dynamic parameter values when the report is opened.

    Steps:

    Create the Power BI Report: Build a report in Power BI that includes dynamic parameters, such as customer ID, workspace ID, etc.

    Define Parameters: Set up the parameters either in the Power Query Editor or Power BI Desktop, ensuring they can be adjusted as needed.

    Save as .PBIT: Save the report as a .PBIT (Power BI Template) file. This template can then be programmatically modified to reflect the specific parameters for each customer, ensuring they see only their relevant data when the report is opened.

    Reference: Create template apps in Power BI - Power BI | Microsoft Learn

     

    Thank you.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi DiKi-I ,

    I hope the information provided is helpful. I wanted to check whether you were able to resolve the issue with the provided solutions. Please let us know if you need any further assistance.

    Thank you.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi DiKi-I ,

    We’d like to follow up regarding the recent concern. Kindly confirm whether the issue has been resolved, or if further assistance is still required. We are available to support you and are committed to helping you reach a resolution.

    Best Regards,
    Chaithra E.

  • Hi, I highly recommend looking to work with the fabric-cicd Python library if you are looking to do the automatic rebinding when deploying to another workspace:

    https://microsoft.github.io/fabric-cicd/0.1.29/

    Here's a link to an example Git repository that you can use with a YAML pipeline in Azure DevOps that can help you get started:
    https://github.com/kevchant/AzureDevOps-fabric-cicd-sample 

    If this answers your question please give kudos and/or accept as solution.

  • nganesh's avatar
    nganesh
    Frequent Visitor

    We have a similar situation. where one data model and set of reports fans out to multiple customers in each dev, qa, and prod environments. Once the data model is deployed, we change the parameters to client id and set the environment. While I am able to refresh the data model, I am getting 404 while trying to perform other operations. Deployment code is written in Python. 

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi nganesh ,

    A 404 after a successful token refresh usually means the token is fine, but the workspace/item ID is wrong, or you’re calling the wrong API for the artifact type.

    Check these:

    Correct Workspace & Item ID
    Make sure the IDs actually exist in that environment.

    Use the right API:
    Fabric items:
    https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items
    Classic Power BI datasets:
    https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets

    Token scope:
    Ensure the identity has Workspace role: Member/Admin,
    Entra scope: https://api.fabric.microsoft.com/.default

     

    Quick Debug


    print("Workspace:", workspace_id)
    print("Item:", dataset_id)
    print("URL:", request_url)
    print("Status:", response.status_code)
    print("Body:", response.text)


    Then verify:
    The item actually exists in the workspace
    You’re using the correct API for the artifact type
    The caller has the right permissions (Member/Admin)

    Hope this helps.
    Thank you.