Skip to content

Master accounts and service principals

David Rodríguez edited this page Feb 11, 2021 · 6 revisions

You can setup the module using a master account or a service principal. A master account is a Power BI Pro licensed user, that can be normally used on dev/test environments. For production environments, Microsoft recommends to setup a service principal so no Power BI Pro license is needed to connect DNN with a Power BI Embedded workspace. In any case, the master account or the service principal needs permissions to access the workspace before it can be registered on DNN.

Development and testing with master accounts

Master accounts come with a limited number of "embed tokens" that should be sufficient to setup the environment even without using a Power BI Embedded capacity, using a regular workspace instead one with the "Premium" icon on it. If you run out of embed tokens on the master account, the result is that you can't embed more reports on the website until you change the workspace to use a Power BI Embedded capacity.

Tip: You can check the % of the usage of tokens on your master account so you can have an idea on where you stand using Get Available Features API call.

GET https://api.powerbi.com/v1.0/myorg/availableFeatures

{
  "features": [
    {
      "name": "embedTrial",
      "state": "Enabled",
      "extendedState": "Enabled",
      "additionalInfo": {
        "usage": 65
      }
    }
  ]
}

Production environments and service principals

As commented above, Microsoft recommends to use service principals for production environments. To create a service principal for a production environment:

  1. Follow the steps described at https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal
  2. Change through the DNN Power BI Embedded workspace settings, the credetials type from Master User to Service Principal, and enter the Application Id and Secret from the previous step

Service principals will only work with workspaces running on a Premium/Embedded capacity, so if the Power BI Embedded capacity is paused, you will get an error when trying to render a embedded report.

Next steps

Now that you understand the difference between master accounts and service principals, let's continue with the Set up your Power BI embedding environment