Here we will see how we can access Power BI Embed reports and Dashboards in ASP.NET MVC applications.
Let’s start with a small introduction to Power BI. Power BI is a reporting tool provided by Microsoft. It is accessible in two forms windows version and web version. Using windows version, we can design reports and then publish it to the Power BI server and Web version Power BI can be used to view that Published report.
Power BI server URL: https://powerbi.microsoft.com/en-us/
Prerequisite to Start with Power BI:
Please follow the below steps to set up the Environment before starting with integration.
Note: Copy these details to somewhere User Id, Password, ClientID, Client Secret Key
We can access this report directly without any authorization with the help of the URL. In that case, there is no data security. That’s why we are using Power BI Embed, and this report will be loaded with the help of Embedded URL and We’ll use Authorization Token for Authentication.
Power Integration Steps
I.E. Get Workspace list inside Active Directory, Get Workspace items list, etc.
API URL for generating Bearer token: https://login.microsoftonline.com/common/oauth2/token
API URL: https://api.powerbi.com/v1.0/myorg/groups/
Web URL: It can be accessed without authentication, which is open for all. You can access reports by browsing the URL in the browser directly.
Embed URL: It is Secure URL which we are going to use for secure integration purpose.
API URL: https://api.powerbi.com/v1.0/myorg/groups/{GroupID}/reports
API URL: https://api.powerbi.com/v1.0/myorg/groups/{GroupID}/reports/{ReportId}/generatetoken
Conclusion:
After reading the blog, We have learned about Power BI API and the integration of those APIs into ASP.NET MVC application.
RELATED BLOGS:
Experienced Software Engineer with a demonstrated history of working in the information technology and services industry. Skilled in SQL, Web Applications, C#, jQuery, Javascript. Strong engineering professional with a Bachelor's degree focused in Computer Software Engineering from veerayatan group of institution.