Use the CData API Server in Microsoft Power BI



You can use the CData API Server to feed Dynamics CRM data to Power BI dashboards. Simply drag and drop Dynamics CRM data into data visuals on the Power BI canvas.

The CData API Server enables you to use REST, OData, JSON, or Open APIs to connect to and query Dynamics CRM data. The OData standard enables real-time access to the live data, and support for OData is integrated into Power BI. This article details how to import an OData feed of Dynamics CRM data into Microsoft Power BI.

About Dynamics CRM Data Integration

CData simplifies access and integration of live Microsoft Dynamics CRM data. Our customers leverage CData connectivity to:

  • Read and write data in the Dynamics CRM 2011+ Services and Dynamics CRM Online.
  • Extend the native features of Dynamics CRM with customizable caching and intelligent query aggregation and separation.
  • Authenticate securely with Dynamics CRM in a variety of ways, including Azure Active Directory, Azure Managed Service Identity credentials, and Azure Service Principal using either a client secret or a certificate.

CData customers use our Dynamics CRM connectivity solutions for a variety of reasons, whether they're looking to replicate their data into a data warehouse (alongside other data sources) or analyze live Dynamics CRMa data from their preferred data tools inside the Microsoft ecosystem (Power BI, Excel, etc.) or with external tools (Tableau, Looker, etc.).


Getting Started


Set Up the API Server

If you have not already done so, download the CData API Server. Once you have installed the API Server, follow the steps below to begin producing secure Dynamics CRM OData services:

Connect to Dynamics CRM

To work with Dynamics CRM data from Microsoft Power BI, we start by creating and configuring a Dynamics CRM connection. Follow the steps below to configure the API Server to connect to Dynamics CRM data:

  1. First, navigate to the Connections page.
  2. Click Add Connection and then search for and select the Dynamics CRM connection.
  3. Enter the necessary authentication properties to connect to Dynamics CRM.
  4. After configuring the connection, click Save & Test to confirm a successful connection.

Configure API Server Users

Next, create a user to access your Dynamics CRM data through the API Server. You can add and configure users on the Users page. Follow the steps below to configure and create a user:

  1. On the Users page, click Add User to open the Add User dialog.
  2. Next, set the Role, Username, and Privileges properties and then click Add User.
  3. An Authtoken is then generated for the user. You can find the Authtoken and other information for each user on the Users page:

Creating API Endpoints for Dynamics CRM

Having created a user, you are ready to create API endpoints for the Dynamics CRM tables:

  1. First, navigate to the API page and then click Add Table .
  2. Select the connection you wish to access and click Next.
  3. With the connection selected, create endpoints by selecting each table and then clicking Confirm.

Gather the OData Url

Having configured a connection to Dynamics CRM data, created a user, and added resources to the API Server, you now have an easily accessible REST API based on the OData protocol for those resources. From the API page in API Server, you can view and copy the API Endpoints for the API:

Connect to Dynamics CRM Data from Power BI Desktop

  1. Open Power BI Desktop and click Get Data -> OData feed.
  2. In the OData feed connection, set the URL property to the OData Endpoint URL previously copied and click OK (e.g. "http://localhost:8080/api.rsc"):
  3. In the next step of the wizard, define the authentication credentials. Select Basic and then enter the credentials for a user authorized to make requests. Specify the User name and enter the user's authtoken in the Password field:
  4. Select the tables that you would like to import into Power BI and click Load

Create Data Visualizations

After pulling the data into Power BI, you can create data visualizations in the Report view. Follow the steps below to create a pie chart:

  1. Select the pie chart icon in the Visualizations pane.
  2. Select a dimension in the Fields pane: for example, Genre Name.
  3. Select a measure in the Fields pane: for example, GenreId.

You can change sort options by clicking the ellipsis (...) button for the chart. Options to select the sort column and change the sort order are displayed.

You can use both highlighting and filtering to focus on data. Filtering removes unfocused data from visualizations; highlighting dims unfocused data. You can highlight fields by clicking them:

You can apply filters at the page level, at the report level, or to a single visualization by dragging fields onto the Filters pane. To filter on the field's value, select one of the values that are displayed in the Filters pane.

Click Refresh to synchronize your report with any changes to the data.

Free Trial & More Information

If you are interested in connecting to your Dynamics CRM data (or data from any of our other supported data sources) from Microsoft Power BI, download API Server to begin creating flexible and customizable REST, OData, JSON and Open APIs from any database or data store! As always, our world-class support team is ready to answer any questions you may have.

Ready to get started?

Learn more or sign up for a free trial:

CData API Server