Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello,
I am having issue to publish a report throw a power automate.
The purpose of this flow is for a public user to report (via the main service account) on a Fabric workspace via API.
The Fabric space has a Fabric licence and the main service account is a contributor.
The main service account has the correct rights on the app registration (Power BI Service → Dataset.ReadWrite.All and Report.ReadWrite.All).
The flow is configured in four parts.
Part 1
Manually trigger a flow to drop the pbix file.
Part 2
HTTP - POST - Retrieve the authorisation token
with Azure authentication, app registration.
+ Set access token.
Part 3
HTTP - POST - Publish the report
‘uri’: ‘https://api.powerbi.com/v1.0/myorg/groups/{MyWorkspaceID}/imports?datasetDisplayName=@{triggerBody()...file”]?[“name”]}&nameConflict=CreateOrOverwrite’
‘headers’: {
‘Content-Type’: ‘application/octet-stream’,
‘Authorisation’: ‘@{variables(“access_token”)}’
}
‘body’: ‘@{base64ToBinary(triggerBody()?[“file”]?[“contentBytes”])} ’
Part 4
Creating a log entry in a SharePoint list
An error occurs in part 3
{‘code’:‘BadRequestException’,“message”:‘The request was denied, it contains illegal input: “”’}
I reproduce the flow on C# and it works.
Why cause this issue ? and how to push the report without issue ?
Regards,
Théo
Solved! Go to Solution.
Here's the solution based on this article Use Power Automate HTTP Connector to Publish .pbix File Using the Power BI API – Joel Leichty
The HTTP step need the authentification by Active Directory OAuth.
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"headers": {
"Content-Disposition": "form-data; name=\"Rapport\"; filename=\"Rapport.pbix\""
},
"body": @{base64ToBinary(triggerBody()?['file']?['contentBytes'])}
}
]
}
Here's the solution based on this article Use Power Automate HTTP Connector to Publish .pbix File Using the Power BI API – Joel Leichty
The HTTP step need the authentification by Active Directory OAuth.
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"headers": {
"Content-Disposition": "form-data; name=\"Rapport\"; filename=\"Rapport.pbix\""
},
"body": @{base64ToBinary(triggerBody()?['file']?['contentBytes'])}
}
]
}
You will need to create and use a custom connector for the Power BI REST API calls. It is not possible to authenticate the way you are attempting to. The custom connector will handle the authentication for you.
HI @lbendlin,
thanks for your reply.
Can you elaborate a bit more ?
I have set the Power BI connector, but there is no action to import a report:
Regards,
Théo
You will need to create and use a custom connector for the Power BI REST API calls.
Custom connectors overview | Microsoft Learn
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |