Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
T_dey
Regular Visitor

Publish Bulk paginated report in PowerBI service using Powershell

I am currently working on a project that involves migrating all paginated reports to the Power BI Service. We have thousands of paginated reports, which are already categorized and organized into relevant folders and subfolders.

To streamline this process, I have a PowerShell script that will publish all the paginated reports to the Power BI Service.

 

Here is the script that will only publish paginated reports to the service: 

 

Import-Module MicrosoftPowerBIMgmt
Connect-PowerBIServiceAccount -UseDeviceAuthentication
$workspaceId = <WorkspaceID>
$rdlFolder = <Local folder path where I have stored the RDLs>

$workspace = Get-PowerBIWorkspace -Id $workspaceId

if (-not $workspace) {
Write-Host "Workspace '$workspaceId' not found." -ForegroundColor Red
exit
}

Get-ChildItem -Path $rdlFolder -Filter *.rdl | ForEach-Object {
$rdlPath = $_.FullName
$reportName = $_.BaseName

try {
$response = Invoke-PowerBIRestMethod -Path $rdlPath `
-Name $reportName `
-WorkspaceId $workspace.Id `
-ConflictAction CreateOrOverwrite
Write-Host "Uploaded: $reportName"
} catch {
Write-Host "Failed to upload: $reportName $_"
}
}


And the above script returns error: Failed to Upload: A parameter cannot be found that matches parameter name 'Path'

 

 

1 ACCEPTED SOLUTION
bradsy
Microsoft Employee
Microsoft Employee
11 REPLIES 11
v-agajavelly
Community Support
Community Support

Hi @T_dey ,

I hope the response provided helped in resolving the issue. If you still have any questions, please let us know we are happy to address.

Regards,
Akhil.

What guidelines? Citation please.

v-agajavelly
Community Support
Community Support

Hi @T_dey ,

Did you get a chance to review the documents shared by @bradsy  Let us know if you need any assistance.

Regards,
Akhil.

bradsy
Microsoft Employee
Microsoft Employee
v-agajavelly
Community Support
Community Support

Hi @T_dey ,

The 403 Forbidden error usually happens when you're trying to upload a paginated .rdl report to a workspace that’s not in Premium or Fabric capacity even if you're an admin.

To fix it

  • Go to your workspace in Power BI Service.
  • Check if there's a diamond icon (◇) next to the workspace name.
  • If not, the workspace is not Premium and paginated report uploads will fail.
  • Ask your Power BI admin to assign the workspace to a Premium or Fabric capacity.

Once that’s done, your script will work as expected. Let me know if you want help checking the capacity or testing it manually.

Regards,
Akhil.

T_dey
Regular Visitor

Hi @v-agajavelly 

I have applied the changes, but I am encountering the following error:

"Failed to upload: Inter-Company Fee Income. The remote server returned an error: (403) Forbidden."

 

This is happening even though I am the admin to the workspace.

v-agajavelly
Community Support
Community Support

Hi @T_dey ,

Just wanted to follow up again on the updated REST API method for uploading .rdl files using Invoke-RestMethod. Were you able to give it a try? It should address the limitation with -Path and -Name parameters from Invoke-PowerBIRestMethod. If you ran into any challenges or need help extending it further for example, supporting subfolder deployments, better error handling, or batch uploads I'm happy to assist.

Regards,
Akhil.

v-agajavelly
Community Support
Community Support

Hi @T_dey ,

Just checking in did you get a chance to try the updated REST API approach for uploading .rdl files using Invoke-RestMethod instead of Invoke-PowerBIRestMethod?

It should solve the issue around the unsupported -Path and -Name parameters. Let me know if it worked for you or if you'd like help extending it further maybe to handle subfolders or error logging?

Happy to assist if you're still working through it.

Rgards,
Akhil

v-agajavelly
Community Support
Community Support

Hi @T_dey ,

You're very close  the issue is that Invoke-PowerBIRestMethod doesn't support -Path and -Name parameters for uploading .rdl files. Instead of.

Invoke-PowerBIRestMethod -Path $rdlPath `
-Name $reportName `
-WorkspaceId $workspace.Id `
-ConflictAction CreateOrOverwrite

You should replace that block with a REST API call using Invoke-RestMethod, like this:

$token = (Get-PowerBIAccessToken).AccessToken
$url = "https://api.powerbi.com/v1.0/myorg/groups/$($workspace.Id)/imports?datasetDisplayName=$reportName&nameConflict=CreateOrOverwrite"
Invoke-RestMethod -Uri $url `
                  -Method Post `
                  -Headers @{ Authorization = "Bearer $token" } `
                  -InFile $rdlPath `
                  -ContentType "application/octet-stream"

This will correctly upload your paginated .rdl files to the Power BI Service using the REST API.

Let me know if you'd like help extending this to handle subfolders or advanced error handling.

Regards,
Akhil.

Hi , I have a script that uses your suggested solution and I get error 403. My user account has access to the workspaces and they are all Fabric capacity workspaces. What else can I check.  I am using human AD account to login,  might this be the issue?

lbendlin
Super User
Super User

instead of -Path you need to use -Url

 

You will most likely also specify -Method  (PATCH or POST)

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.