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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
akarkal
Frequent Visitor

Import Pbix File as Service Principal

I have the following settings going

 

- Tenant Developer Setting is enabled for Service Principal to access Admin APIs

- Service Principal is added as administrator to the workspace

- I am trying to upload a pbix to import as a report + dataset using the following 

 

                    _ = await client
                        .Imports.PostImportWithFileAsync(
                            powerbiGroupId,
                            stream,
                            reportName,
                            ImportConflictHandlerMode.Overwrite,
                            skipReport: false);

 

- powerbiGroupId = workspace ID

- stream = stream from the file

- reportName = valid report name to be uploaded

 

I keep getting 

 

System.Net.Http: The operation was canceled. System.Net.Http: 
Error while copying content to a stream. System.Net.Sockets:
Unable to read data from the transport connection:
The I/O operation has been aborted because of either a thread exit or an application request..
The I/O operation has been aborted because of either a thread exit or an application request.

The file is between 1MB - 1.4 MB. How do I check what the underlying issue is. Is there a limit that I am hitting ?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @akarkal ,

 

I check the limitation about Service principal. Service principal only support some read-only admin APIs. Post Import a pbix file to workspace needs Dataset.ReadWrite.All.

Here is the offical blog: Considerations and limitations

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @akarkal ,

 

I check the limitation about Service principal. Service principal only support some read-only admin APIs. Post Import a pbix file to workspace needs Dataset.ReadWrite.All.

Here is the offical blog: Considerations and limitations

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.