Forum Discussion

cdupland's avatar
cdupland
Frequent Visitor
9 years ago
Solved

Synchronous Power BI Service & Azure AD

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.c...
  • Eric_Zhang's avatar
    Eric_Zhang
    9 years ago

    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


    cdupland

    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".