Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi ,
I am trying to generate access token to access data through PBI API. I am using grant_type = authorization_code. I am following each and every step given in the below article -
https://www.sqlshack.com/how-to-access-power-bi-rest-apis-programmatically/
I have registered my app in Azure AD and have taken all the necessary permissions -
What i believe that all necessary permissions have been granted to the application.
I have a Power BI administrator credentials
I am trying to check the API in postman as below -
But getting this error -
I am not able to understand how to resolve it. Can anybody help me out.
I shall be thankful in advance.
Solved! Go to Solution.
Hi @Amar-Agnihotri ,
According to your description, you are calling Power BI REST API From Postman.
Did you add a Client Secret that will be displayed as the Value (not the Secret ID) in the Client Secrets section?
To set Postman up for use with various kinds of requests that you will be mailing off, set up Environment variables and Collections. (You can read up on Collections and Environment and other facilities in the documentation.)
For more details, please refer to :
https://www.csgpro.com/blog/power-bi-rest-apis/
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
I made few changes in API call and the result is achieved -
See the changes in POST Request -
By this way we can get access token using Authorization Code
To know all about the authorization code from scratch click this link-
https://www.sqlshack.com/how-to-access-power-bi-rest-apis-programmatically/
There is way using id and password also to call REST API but that methode will never be preferred. Always try to follow the Authorization code method.
To know more about creating an admin panel follow this BI ELITE link -
https://www.youtube.com/watch?v=cTqFNg_y9lw&list=PLL-WSn9hvefogtxxi7CJhjLCJvrDY0mpQ
Hello,
I made few changes in API call and the result is achieved -
See the changes in POST Request -
By this way we can get access token using Authorization Code
To know all about the authorization code from scratch click this link-
https://www.sqlshack.com/how-to-access-power-bi-rest-apis-programmatically/
There is way using id and password also to call REST API but that methode will never be preferred. Always try to follow the Authorization code method.
To know more about creating an admin panel follow this BI ELITE link -
https://www.youtube.com/watch?v=cTqFNg_y9lw&list=PLL-WSn9hvefogtxxi7CJhjLCJvrDY0mpQ
Hi @Amar-Agnihotri ,
According to your description, you are calling Power BI REST API From Postman.
Did you add a Client Secret that will be displayed as the Value (not the Secret ID) in the Client Secrets section?
To set Postman up for use with various kinds of requests that you will be mailing off, set up Environment variables and Collections. (You can read up on Collections and Environment and other facilities in the documentation.)
For more details, please refer to :
https://www.csgpro.com/blog/power-bi-rest-apis/
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @V-lianl-msft . I have added a client secret value. Yeah i have tried it via creating enviornment variables also and it worked . Also your post is helpful to achive this so i am accepting it as a solution.
Thanks 😊
I have also used custome connector . That is working fine in PBI desktop when when i tried to refresh dataset in PBI service it throws an error -
Also searching solution for this.
You can see here that i have already added a client secret
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
113 | |
105 | |
95 | |
58 |
User | Count |
---|---|
175 | |
147 | |
134 | |
105 | |
82 |