Forum Discussion

amitpatra's avatar
amitpatra
New Member
1 year ago
Solved

Schedule Power BI Dataset refresh with Service Principal ID

Hello,

 

Can someone plz tell me the detailed steps to refresh Power BI datasets using Service Principal ID/App and the methods.

 

Thanks,

Amit

  • You can call the Update Refresh Schedule In Group API. The SPN must own the Semantic Model

     

    Request body looks like this

     

    {

      "value": {

        "days": [

          "Sunday",

          "Tuesday",

          "Friday",

          "Saturday"

        ],

        "times": [

          "07:00",

          "11:30",

          "16:00",

          "23:30"

        ],

        "localTimeZoneId": "UTC"

      }

    }

  • Hi amitpatra ,

    Thank you for the valuable suggestion, Deku , Your advice to use the Update Refresh Schedule In Group API is excellent for automating refresh schedules with a Service Principal.

     

    To add to that, if the goal is to trigger an on-demand dataset refresh ( after a data pipeline finishes or for manual workflows), the Refresh Dataset In Group API can be used.

    API Endpoint: 

    POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes

     

    Datasets - Refresh Dataset In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

    Key Requirements:

    1. The Service Principal must have Admin or Contributor access to the workspace or own the dataset.
    2. A valid Bearer token must be included in the request header for authentication.

    I hope this is helpful.......

5 Replies

  • Deku's avatar
    Deku
    Super User

    You can call the Update Refresh Schedule In Group API. The SPN must own the Semantic Model

     

    Request body looks like this

     

    {

      "value": {

        "days": [

          "Sunday",

          "Tuesday",

          "Friday",

          "Saturday"

        ],

        "times": [

          "07:00",

          "11:30",

          "16:00",

          "23:30"

        ],

        "localTimeZoneId": "UTC"

      }

    }

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Community Support

    Hi amitpatra ,

    Thank you for the valuable suggestion, Deku , Your advice to use the Update Refresh Schedule In Group API is excellent for automating refresh schedules with a Service Principal.

     

    To add to that, if the goal is to trigger an on-demand dataset refresh ( after a data pipeline finishes or for manual workflows), the Refresh Dataset In Group API can be used.

    API Endpoint: 

    POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes

     

    Datasets - Refresh Dataset In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

    Key Requirements:

    1. The Service Principal must have Admin or Contributor access to the workspace or own the dataset.
    2. A valid Bearer token must be included in the request header for authentication.

    I hope this is helpful.......

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Community Support

    Hi amitpatra ,

    we wanted to check in as we haven't heard back from you. Did our solution work for you? If you need any more help, please don't hesitate to ask. Your feedback is very important to us. We hope to hear from you soon.

    Thank You.

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Community Support

    Hi amitpatra ,

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we provided for your issue worked for you  or let us know if you need any further assistance?

    Your feedback is important to us, Looking forward to your response. 

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Community Support

    Hi amitpatra ,

    Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as 'Accepted Solution' to assist other community members experiencing the same issue.