Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I am newly using Power BI service. I would like to refresh my dataset to have a real-time report.
I want to use the Power BI API to do that with request :
POST https://api.powerbi.com/v1.0/myorg/groups/{group_id}/datasets/{dataset_id}/refreshes
I have problem to get the token before the refreshing request :
'Application with identifier '**1607a9-****-****-****-****2bb47f5' was not found in the directory **54b29a-****-****-****-****dcf8a376'.
I fact, I use Power BI Service with an proffessionnal account and one password, but using Portal Azure with an personal account and anoter password.
The mail is same for both.
How can synchronous bot to use API for refresh my dataset ?
Or is that possible to have real-time Power BI report with an Power BI Embedded ressource in Azure Portal ?
Thanks.
Solved! Go to Solution.
@cdupland wrote:
Hi @Eric_Zhang,
Thanks for answer.
I was using this URL to register an register an app.
How can I set my Azure account to proffessionnal and associate it with my Azure account ?
Note that we are in the BizSpark+ Program and our mail are associate to this program.
Refresh limitations is for schedule but manual refresh on Power BI Service doesn't have limitation. Using the API is not the same action ?
Thanks for the demo link, have you got some one for PHP ?
Cyril
When regersitering that app, use the Power BI Pro account(see below snapshot). And then log in Azure portal with the same account to grant permission as the "Using the Azure AD Portal" in the step 1 in this link.
I don't know PHP, but I think you can reproduce the demo, because the C# demo is just calling two REST APIs, no specific SDK at all.
POST /common/oauth2/token HTTP/1.1 Host: login.windows.net Cache-Control: no-cache Content-Type: application/x-www-form-urlencoded client_id=49xxxxxxxxx-6dxxxd1a4&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&username=yourusername&password=yourpassword
POST /v1.0/myorg/groups/dc581184-a209-463b-8446-5432f16b6c15/datasets/1f6285a5-7b98-4758-8f81-77b7ae5637d6/refreshes HTTP/1.1 Host: api.powerbi.com Authorization: Bearer eyJ0xxxxx Content-Type: application/json Cache-Control: no-cache
As to limitation, based on my test, the refresh API shares the limitation with "Schedule refresh" other than "Manual refresh".
@cdupland wrote:
Hi everyone,
I am newly using Power BI service. I would like to refresh my dataset to have a real-time report.
I want to use the Power BI API to do that with request :
POST https://api.powerbi.com/v1.0/myorg/groups/{group_id}/datasets/{dataset_id}/refreshes
I have problem to get the token before the refreshing request :
'Application with identifier '**1607a9-****-****-****-****2bb47f5' was not found in the directory **54b29a-****-****-****-****dcf8a376'.
I fact, I use Power BI Service with an proffessionnal account and one password, but using Portal Azure with an personal account and anoter password.
The mail is same for both.
How can synchronous bot to use API for refresh my dataset ?
Or is that possible to have real-time Power BI report with an Power BI Embedded ressource in Azure Portal ?
Thanks.
What account did you use to register the app? I think you shall use the proffessionnal account all the time when registering the app and logining azure portal to grant permissions as the steps in above link.
Calling the refresh API is definitely not an approach for real-time report with a Pro license, as this API also has the schedule refresh limitation(8 times per day, if you'd like to lift this limitation, you may have to buy a premium license, see this link). For real-time purpose, as always, you have to use datasources that supports direct query mode or you can reference Real-time streaming in Power BI
By the way, a simple demo calling the refresh API for your reference.
Hi @Eric_Zhang,
Thanks for answer.
I was using this URL to register an register an app.
How can I set my Azure account to proffessionnal and associate it with my Azure account ?
Note that we are in the BizSpark+ Program and our mail are associate to this program.
Refresh limitations is for schedule but manual refresh on Power BI Service doesn't have limitation. Using the API is not the same action ?
Thanks for the demo link, have you got some one for PHP ?
Cyril
@cdupland wrote:
Hi @Eric_Zhang,
Thanks for answer.
I was using this URL to register an register an app.
How can I set my Azure account to proffessionnal and associate it with my Azure account ?
Note that we are in the BizSpark+ Program and our mail are associate to this program.
Refresh limitations is for schedule but manual refresh on Power BI Service doesn't have limitation. Using the API is not the same action ?
Thanks for the demo link, have you got some one for PHP ?
Cyril
When regersitering that app, use the Power BI Pro account(see below snapshot). And then log in Azure portal with the same account to grant permission as the "Using the Azure AD Portal" in the step 1 in this link.
I don't know PHP, but I think you can reproduce the demo, because the C# demo is just calling two REST APIs, no specific SDK at all.
POST /common/oauth2/token HTTP/1.1 Host: login.windows.net Cache-Control: no-cache Content-Type: application/x-www-form-urlencoded client_id=49xxxxxxxxx-6dxxxd1a4&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&username=yourusername&password=yourpassword
POST /v1.0/myorg/groups/dc581184-a209-463b-8446-5432f16b6c15/datasets/1f6285a5-7b98-4758-8f81-77b7ae5637d6/refreshes HTTP/1.1 Host: api.powerbi.com Authorization: Bearer eyJ0xxxxx Content-Type: application/json Cache-Control: no-cache
As to limitation, based on my test, the refresh API shares the limitation with "Schedule refresh" other than "Manual refresh".
All working fine 🙂
Thanks you very much for your help.
You right for the limitation, real-time is not possible with Power BI Pro.
Cyril
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |