Power BI REST API provides service for embedding the reports in another application, accessing the data, create/modify the user permissions.
To use Power BI embedded analytics, you need to register an Azure Active Directory (Azure AD) application in Azure. The Azure AD app establishes permissions for Power BI REST resources, and allows access to the Power BI REST APIs.
Create an application in Azure – This application establishes permissions for Power BI Rest APIs by providing Application ID and secret keys
To create an application in Azure follow the below blog
Follow the below steps to access the Power BI Rest APIs using Postman
1. Open Postman application
Make data easy with Helical Insight. Helical Insight is world's best open source business intelligence tool.
Click Here to Free Download
2. First we need to generate authentication token to access Rest APIs
3. Use the below URL with the POST request
https://login.microsoftonline.com/common/oauth2/token
4. Go to headers, enter ‘application/x-www-form-urlencoded’ as Content-Type
5. Click on body, select raw as type
6. Enter the below values in the body
grant_type=password
&username=<Power BI Application logged-in username>
&password=<Power BI Application logged-in password>
&client_id=<application ID>
&client_secret=<application secret>
&resource=https://analysis.windows.net/powerbi/api
7. Enter the Power BI service user credentials, application ID and secret keys which copied in the above steps
8. Click on Send
9. Successful request will generate the response and we can see the access token in the response
10. Copy the access token
11. Click on New Request
12. We will use the an API which will give the list of reports information. Use the below API
Make data easy with Helical Insight. Helical Insight is world's best open source business intelligence tool.
Click Here to Free Download
GET https://api.powerbi.com/v1.0/myorg/reports
13. Go to Authorization, Select Bearer token as type and enter above copied access token
14. Click on send, successful request will give the response
We are able to accessing the Power BI Rest APIs using Postman, this way we can access other Power BI APIs also to get the required information
Thank You
Ramu Vudugula
BI Developer
Helical IT Solutions Pvt Ltd
Best Open Source Business Intelligence Software Helical Insight is Here
It would be good to add some detail on how to do this using SPN for cases where MFA prevents use of username and password
from where are we getting the client id and client secret ?
Many thanks for the explainations!
Is there a workaround to get the same task but with an account which needs multi-factor authentication?
Thanks again,
Gianluca