To be able to authenticate with Power BI a token is required. The token is delivered by Azure AD and to get it crm-powerbi-viewer must be registered as a valid application.

(new) Power BI Simplified Flow

The Power BI team has created a schema that simplifies the creation of an application in Azure AD. You still need to perform a few steps in the Azure portal but the flow is easier and with fewer steps. The guide on this page is the original one with all the steps taking place in Azure. The new guide using the Power BI schema can be found here.

If you encounter issues following the new flow - please validate the created application using the guide on this page.

Steps

  1. Go to the Azure portal at https://portal.azure.com.
  2. Navigate to your Active Directory.
  3. Then to App Registrations
  4. Add new

  5. Enter details. Name the application “Dynamics 365 Power BI Viewer”, set the type to “Web app / API”, and set sign-on url to the URL of your Dynamics CRM instance https://yourinstancename.crm?.dynamics.com/*
  6. Create the app

  7. Open the newly created app

  8. The application needs access to Power BI. Go to required permissions, and …
  9. add new

  10. Select API, and …
  11. choose “Power BI Service”

    Can’t find the service? You remembered to create a report or dashboard in Power BI right? If not it might be that Power BI has not been associated with your environment. Login to Power BI before re-trying…

  12. Next step is setting Power BI permissions
  13. What you need is rights to view.

    The Power BI team is currently adjusting the list of permissions. The image below may not be up to date. Make sure you have view rights to everything.

    If you encounter issues (e.g. 401), try to set all permissions not requiring admin.

  14. Click select to set the new permissions…
  15. and click done as that is what you are (almost)

    15b Grant Permissions. After setting permissions you need to grant them to all users. Press the button named “Grant Permissions” (see 15b).

  16. Two changes to the manifest are required
  17. Change the following from false to true:

    "oauth2AllowImplicitFlow": true,
    "oauth2AllowUrlPathMatching": true,
    
  18. And save.

  19. Finally copy the application id as this will be required when configuring the solution in Dynamics 365.



Next step is to install and configure crm-powerbi-viewer in Dynamics 365.