Use Power Automate HTTP Connector to Publish .pbix File Using the Power BI API

This will describe how to Publish a file from SharePoint to using Power Automate HTTP Connector to call the API.

You might end up on this blog after looking at Microsoft’s article on this function here:

Prerequisite Knowledge

  • You know the basics of the Power BI API, including how to setup the Service Principal (App Registration, Access, etc).
  • You know the basics of using the Power Automate HTTP connector.
  • You can already do *something* successfully with the Power BI API. This blog won’t explain how to authenticate the HTTP connector.

JSON Format for HTTP Body

Here’s the correct JSON for the Body of the HTTP Request

  "$content-type": "multipart/form-data",
  "$multipart": [
      "headers": {
        "Content-Disposition": "form-data; name=\"TestAPI\"; filename=\"TestAPI.pbix\""
      "body": SharePoint File Content

As you can see in the first screenshot, the text in red can be replaced with Power Automate Variables. I’m using the SharePoint Get File Properties (Name, File Name With Extension) and SharePoint Get File Content (.pbix File) connectors to get these values.

URL and Parameters

Here’s a sample URL. Replace red text with variables or hard code your values.

skipReport=true means you can publish a Dataset only without publishing the Report!

Hat Tip

THANK YOU blogger/MVP Mohamed Ashiq Faleel for writing the post below. There were some pieces to put together, but without this blog I would not have solved this.

2 Replies to “Use Power Automate HTTP Connector to Publish .pbix File Using the Power BI API”

  1. Thanks for your post.
    At the moment I’am stuck.
    I do not know, how to use “Get File Properties” and “Get File Content” to receive the needed content for “body”: SharePoint File Content
    Any help would be appreciated.
    Thank you.
    BR, Hp


    1. Those are Flow steps using the SharePoint connector. It assumes you have a .pbix file stored in SharePoint or Teams.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s