Connect to Cognite Data Fusion from Power Query Desktop
Follow these steps to connect a Cognite Data Fusion (CDF) project as a data source in Power BI.Sign in to Power BI Desktop
Select the Cognite Data Fusion OData connector

Configure the connection details
-
Data Source Identifier: Enter the CDF project name, a data model URL, or a custom OData query to retrieve data from CDF. This is a required field.
To authenticate as a guest user in Entra ID, add the Entra ID tenant ID, for example,
dataSource?tenantId=MyEntraIDTenant.onmicrosoft.com. If you’re passing a custom OData URL that already contains query parameters, then you can add thetenantIdat the end with this syntax:dataSource?$filter={Filter}&tenantId=MyEntraIDTenant.onmicrosoft.com. -
CDF API URL: Enter the URL to the Cognite API, for example,
https://api.cognitedata.comorhttps://az-eastus-1.cognitedata.com. To access some OData services, you might also need to add the API version, for example,https://bluefield.cognitedata.com/20230821.

Authenticate with your account
Connect to the data source
Select the data to load
Load or transform data
Connect to Cognite Data Fusion from Power Query Online
Follow these steps to connect to CDF from Power Query Online.Select Cognite Data Fusion OData

Configure connection settings
- Data Source Identifier: Enter the CDF project name, a data model URL, or a custom OData query to retrieve data from CDF.
- To authenticate as a guest user in Entra ID, add the Entra ID tenant ID, for example,
dataSource?tenantId=MyEntraIDTenant.onmicrosoft.com. - If you’re passing a custom OData URL that already contains query parameters, then you can add the
tenantIdat the end with this syntax:dataSource?$filter={Filter}&tenantId=MyEntraIDTenant.onmicrosoft.com.
- To authenticate as a guest user in Entra ID, add the Entra ID tenant ID, for example,
- CDF API URL: Enter the URL to the Cognite API, for example,
https://api.cognitedata.comorhttps://az-eastus-1.cognitedata.com. To access some OData services, you might also need to add the API version, for example,https://bluefield.cognitedata.com/20230821.

Enter connection credentials
- If you’re connecting to CDF for the first time, select Create new connection under Connection.
- If you’ve connected previously, select an existing connection under Connection.
- For Data gateway: If your organization uses a gateway to access CDF, select the appropriate gateway from the menu. If Data gateway is set to (none), the connector uses the Power BI service to connect to CDF directly.
- You can also select Privacy Level for the data connection.
- For new connections, select Sign in and follow the authentication process.

Proceed after authentication
Choose and create data connection

Filter data
Use Transform Data to apply filters and reduce the amount of data loaded into Power BI.Scheduled refresh
After publishing your report to the Power BI service, you can schedule data refreshes to keep your data current.Data model URLs
If you’re using data models, make sure Data Source Identifier includes the correct data model URL. See Data modeling OData service.Custom queries
Enter custom OData queries in Data Source Identifier to retrieve specific data sets. See Custom OData queries.Migrate to the REST API connector
Migrate existing Power BI reports from the OData connector to the REST API connector. This involves updating the Power Query code at the beginning of each data query.Understand the differences
The OData connector uses the function signatureCognite.Contents and directly accesses tables through URL manipulation:
CogniteDataSource.Contents and separates authentication from data fetching, exposing a table of functions you can choose from.
Migration approach
Choose a migration approach based on the effort you want to invest and the performance improvements you need: Option 1: Minimal changes using ODataCDF For the fastest migration with minimal code changes, use theODataCDF function which maintains compatibility with your existing OData URLs:
-
Replace
Cognite.Contents(in the original query with the code to access theODataCDFfunction as shown above. -
Update the function call to
ODataCDF(with the URL from the original query and the API version. -
Remove
?tenantId=xxxfrom your URLs if present. This was only needed for guest authentication in Azure ENtra ID. -
Keep other OData query parameters, such as
$filterand$select, unchanged.
ODataDataModel function. This option gives cleaner syntax, no URL construction, direct parameters for space, model, and version, and the same OData protocol with improved usability.
Migration steps
Open the report
Update each query
- Open the Power Query editor.
- Select a query using the OData connector.
- Replace the connector code following one of the options above.
-
Remove
tenantIdparameter if present in URLs.
Sign in
Update all queries
Test the changes
Publish and update scheduled refreshes