By leveraging the Cosmos API, users can connect the Power BI Desktop to Cosmos to start building Power BI reports from the Cosmos Data Model. This article covers the steps to connect the Power BI Desktop to the Cosmos API.
It is important to note that only Cosmos users that have been given the API User role are able to leverage the Cosmos API to extract data from Cosmos into other tools such as Power BI.
To connect the Power BI Desktop directly to your Cosmos data, you must first install the Power BI Desktop from the Windows Store. You can then launch the Power BI Desktop application.
Once the Power BI Desktop is open, you can click the Get Data button.
A list of Power BI data sources will appear. You can search for ODATA in the list and then double click on the OData Feed to launch the OData connection wizard.
When prompted for the URL, copy and paste the following: https://api.cosmosdatatech.com/odata and click OK.
If this is your first time connecting to Cosmos from the Power BI Desktop you will be asked how you would like to sign in. Select the Organizational Account option and then click Sign In and sign in with your Microsoft Account. Once you have signed in click the Connect button.
You will then see a list of all your tables from the Cosmos Data Model. Select the tables that you would like to add and click Load. The data from these tables will be loaded into Power BI and you can begin building your Power BI reports.