Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello Team,
I was looking into using the Power BI API in an effort to automate the distribution of a report we have. Is there any documentation on getting setup to use it? I’ve tried sending a few calls via Postman but receive a 403 forbidden as a response. Guessing I’m not authenticating or authorizing correctly? Can you help me out please? Thank you!
Solved! Go to Solution.
Hi, @Anonymous
First of all, you should set the API permissions correctly in Auzre AD and get the correct secret and client ID, which are necessary parameters to get the access token.
Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn
In the following document, the necessary parameters for requesting an access token are described and the meaning of each parameter is explained:
Understand the OAuth 2.0 authorization code flow in Azure AD - Microsoft Entra | Microsoft Learn
The 403 forbidden error can be due to two reasons:
1. You have requested the wrong access token, you can use the following two authorization addresses to request a new access token.
Auth URL: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize
Access Token URL: https://login.microsoftonline.com/organizations/oauth2/token
2. The access token is not set to the request header. The access token should not be in the params in Postman, it should be in the Headers
The correct access token request for Power BI API results as follows:
You can learn how to authorize the Power BI API in Azure AD through the following links:
You need to enable the API feature in the admin portal of Power BI Service, as shown in the following figure:
The following article is a more detailed tutorial on using the REST API:
Power BI REST API: Step-by-step Guide to Use It | Coupler.io Blog
If the above advice can help you, that's great.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
First of all, you should set the API permissions correctly in Auzre AD and get the correct secret and client ID, which are necessary parameters to get the access token.
Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn
In the following document, the necessary parameters for requesting an access token are described and the meaning of each parameter is explained:
Understand the OAuth 2.0 authorization code flow in Azure AD - Microsoft Entra | Microsoft Learn
The 403 forbidden error can be due to two reasons:
1. You have requested the wrong access token, you can use the following two authorization addresses to request a new access token.
Auth URL: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize
Access Token URL: https://login.microsoftonline.com/organizations/oauth2/token
2. The access token is not set to the request header. The access token should not be in the params in Postman, it should be in the Headers
The correct access token request for Power BI API results as follows:
You can learn how to authorize the Power BI API in Azure AD through the following links:
You need to enable the API feature in the admin portal of Power BI Service, as shown in the following figure:
The following article is a more detailed tutorial on using the REST API:
Power BI REST API: Step-by-step Guide to Use It | Coupler.io Blog
If the above advice can help you, that's great.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please be more specific. Do you want to distribute the pbix, do you want to extract data, do you want to render the report into PPT or PDF, or do you want to manage subscriptions?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
19 | |
16 | |
15 | |
12 | |
11 |
User | Count |
---|---|
32 | |
25 | |
25 | |
19 | |
19 |