You are almost near to achieve your goal of becoming Microsoft Power Platform expert. Till now we expect that you have read all the previous blogs and this is our fifth blog. Let have a top-level view of previous blogs.
In first blog we have learned the basic concepts of Power Platform and have learned the introduction of each component of Power Platform. In first blog we have introduction of each and every component of Microsoft Power Platform along with some features of Microsoft Power Platform. Then from blog two to blog five we have Microsoft Graph focused content. In these blogs we have learned how to access data from Graph API and how to connect Graph API to various components of Power Automate. So, it was a nice journey of how to work with a huge amount of data and how to handle the data with the help of Microsoft Graph API.
So now in this blog we are continuing the concepts of Graph API and now we are “connecting Power BI to Microsoft Graph”. As we already have an introduction about these two components and now, we will focus more on the implementation rather the learning the concepts.
Microsoft Power BI is a data analyzing and data visualizing tool which gives the insights of data through reports and dashboards. And with the help of this analyzed data one can make proper decisions.
On the other hand, Microsoft graph is a data accessing API with the help of which we can access data from Microsoft cloud services like Active directory, SharePoint, OneDrive and much more. So now we will play with these two technologies to meet our business solutions. We will learn how to import data in Microsoft Power BI with the help of Microsoft Graph then visualize and analyze that data in Power BI.
For this blog, knowledge of Power BI and Microsft Graph is required because if you don't know how to work with Power BI and Microsft Graph then you can't connect Power BI with Microsoft Graph for mutual functionality. So it is suggested to first learn the basics of Power BI and Microsoft Graph and then learn the skills taught in this blog. So we expect that after learning Power BI and Microsoft Graph concepts we are connecting Power BI to Microsoft Graph.
We can connect Graph API with Power BI using custom connectors for Power BI. Graph API have many important functionalities and one of the most important benefits of Graph API is that it has single endpoint as compared to other Microsoft Graph API’s. The Graph API data source can be used in the Power BI Desktop where we can publish the model to Microsoft Power BI service.
Now let’s see the steps of connecting Power BI with Graph API. The steps are given below:
Login to Power BI Desktop using Microsoft Credentials. Click on Get Data and select OData feed. In simple clicks, you will be able to import the data to Microsoft Power BI Desktop easily.
Just copy the API URL https://graph.microsoft.com/beta/users from the Graph Explorer that can be pasted in the OData feed as shown in the image above. You must login to Graph Explorer before importing data.
Next, import the data shown in your dashboard and then it’s good to go.
The URL given here is used to find the users connected with me. We can also run this as a query in Graph Explorer, just paste the link in Graph explorer search bar and hit run query to see the output as shown below
Note: here the output is hidden due to privacy issues.
There is also modify permissions (preview) tab where we can change and modify permissions for our queries.
Graph explorer has two versions beta and v1.0 and I founded beta as the best versions so it’s recommended to use beta version.
On the left side are sample queries which we can use for testing and learning purposes.
So it was the short and precise overview of Graph API, we can further explore it using Microsoft docs and Microsoft learn platform.
Connect to the Microsoft Graph Security API in Power BI Desktop