Power BI and Dynamics CRM

Dynamics CRM and Power BI

Microsoft is building lots of cloud based technologies these days and Microsoft Dynamics CRM is not an exception. With a powerful data visualisation tool like Power BI Microsoft took a great step to integrate Dynamics CRM and Power BI which means you can easily connect from Power BI website and Power BI Desktop to a cloud based Microsoft Dynamics CRM instance. In this article I express a step-by-step tutorial to be able to connect to connect to Dynamics CRM from Power BI website as well as Power BI Desktop.

Prerequisites:

  • You can only connect to Dynamics CRM Online (Cloud based Dynamics CRM) from both Power BI Desktop and Power BI website. If you have an older version on-premises Dynamics CRM and you’re willing to create visualisations on Power BI then you need to connect to the CRM database on SQL Server instance just like any other SQL Server databases.
  • You need to have a valid OData URL for a Dynamics CRM Online instance and an administrator must enable the OData endpoint in the CRM site settings. To find the OData endpoint address:
      • After browsing your CRM Online in a browser click “Customizations” from “Settings”

Dynamics CRM OData for Power BI

      • Click “Developer Resources”

Dynamics CRM OData for Power BI 2

      • Scroll down and then you can see OData URL under “Organization Data Service”

Dynamics CRM OData for Power BI 3

  • You should connect to Dynamics CRM Online using the same user account as your Power BI website. So if you have a different Power BI account then unfortunately you need to create a new account in Power BI which is identical to your CRM account.
  • Your browser’s popup blocker should be disabled or you should exclude https://login.microsoftonline.com from your popup blocker.
  • As Microsoft Dynamics CRM is integrated with Power BI you need to have Office 365 subscription. If you don’t have Dynamics CRM Online and Office 365 subscription, but, you’re willing to learn how Power BI and Dynamics CRM Online work together you can sign up for a 30-day trial of Microsoft Dynamics CRM here. There is also a trial guide for Microsoft Dynamics CRM Online and Office 365 here.

Power BI Website and Dynamics CRM:

Get Data:

  • Browse and sign in to Power BI website from a browser
  • Click “Get Data” Power BI Get Data
  • From “Content Pack Library” click “Services”

Power BI CRM Connector

  • Click “Microsoft Dynamics CRM” then click “Connect”

Power BI CRM Connector 2

Power BI CRM Connector 3

  • If you get the “Parameter validation failed, please make sure all parameters are valid.” error message then you probably forgot to remove the forward slash (/) from the OData URL.

image

The OData should be something like this:

https://[tenant].crm5.dynamics.com/XRMServices/2011/OrganizationData.svc

rather than

https://[tenant].crm5.dynamics.com/XRMServices/2011/OrganizationData.svc/

  • Select “oAuth2” from “Authentication Method” drop down list then click “Sign In”

Power BI CRM Connector 4

  • Now you’re connecting to Office 365. Sign in to your office 365 account and click on “Work or school account”. Remember, you should use the same user account as your Dynamics CRM Online account here.

Office 365 Credentials

NOTE: Your popup blocker should be disabled.

  • Sign in to your Office 365 account
  • Voila! You can see a predesigned dashboard ready to use in your Power BI website.

Dynamics CRM and Power BI

Schedule Refresh:

  • Find the Dynamics CRM in “Datasets” pane then click “Open Menu” ellipsis

Dynamics CRM and Power BI 2

  • Expand “Data Source Credentials” and “Schedule Refresh” and setup the desired schedule

Dynamics CRM and Power BI 3

Power BI Desktop and Dynamics CRM:

Get Data:

  • Open Power BI Desktop
  • Search for “CRM” to easily find the connector then click connect

Dynamics CRM and Power BI 4

  • Past the OData URL you copied before
  • Remember to remove the last forward slash from the end of the URL
  • Click OK

Dynamics CRM and Power BI 5

  • You can search the tables and select those ones you need then click “Load”

Dynamics CRM and Power BI 6

  • Now you can create your visualisations. I’m not going to explain how to do that as it had been covered here.
  • Publish the visualisation to Power BI website by clicking on the “Publish” button from the ribbon bar

Dynamics CRM and Power BI 7

Schedule Refresh:

  • From Power BI website find your newly published dataset from “Datasets” pane
  • Click “Open Menu” ellipsis

Dynamics CRM and Power BI 8

  • Click “Schedule Refresh”
  • Click “Edit Credentials” under “Data Source Credentials”
  • Select “oAuth2” from “Authentication Method” drop down then “Sign In”

Dynamics CRM and Power BI 9

  • Connect to Office 365 using your credentials
  • Expand “Schedule Refresh” and setup the desired schedule

Dynamics CRM and Power BI 10

All done!

6 thoughts on “Power BI and Dynamics CRM

    1. Hi Rishabh and welcome to biinsight.com.

      For on-prem CRM you need to connect to the CRM SQL Database directly from Power BI.
      You can use this post which explains how to use Power BI over SQL Server.
      You just need to point to a SQL Server instance that hosts your CRM database.

      Cheers.

  1. Are there any reasons that I’d be able to complete all the steps for Power BI web connecting to Dynamics CRM Online, but continue to have “loading…” showing in each widget? I know it warns that it can take a while, but I have given over 30 minutes and we only have about 450 accounts and are newly implemented so only 30-45 leads and a handful of opportunities loaded in so far.

    1. Hi Phil,

      Welcome to biinsight.
      Did you try Power BI Desktop?
      You can download it from here.
      Open Power BI Desktop then select “Dynamics CRM Online” from “Get Data” list and connect.
      See how this one works.
      If it works quicker then create your reports in Power BI Desktop and Publish into Power BI Service.
      Cheers

  2. What an insightful post! Thank you for shedding light on the dynamic relationship between Power BI and Dynamics CRM. Your breakdown of how these two powerful tools can work in harmony to extract invaluable data insights is truly eye-opening.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.