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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Regular Visitor

UpdateReportContent - publish mutiple report

Hi, everyone.

Currently, there are 14 reports in the company's back office (Google Drive) where I work. Whenever visual updates are made from the source (dashboard), I face the challenge of individually publishing them online, having to enter one by one and publish them in the workspace. Recently, I discovered that the Power BI API can solve this problem by allowing direct publication to the desired workspace. Although I have made progress in implementation with my own code, I have encountered a 401 error, indicating a possible permission failure.

I used Microsoft Enter ID, creating an application, registering it, client ID, tenant, client secret, everything possible, authorized permissions in Azure itself, and even so, it continues in error 401.

Is there any guidance or alternative that can help me overcome this obstacle and automate the process of publishing reports effectively?

I appreciate in advance for any help or suggestion provided.

Community Support
Community Support

Hi @isabellasmou 


The 401 error you're experiencing typically indicates an issue with authentication or authorization. Given the steps you've already taken, let's review and ensure all necessary configurations are correctly in place to resolve this issue.

  1. Verify Application Permissions: Ensure that the Azure AD application has been granted the correct permissions. For automating report publishing, you need to have Dataset.ReadWrite.All and Report.ReadWrite.All permissions at a minimum. Please double-check these permissions in the Azure portal under your app registration.

  2. Consent to Permissions: After setting the required permissions, make sure that admin consent has been granted for these permissions. This step is crucial for tenant-wide permissions.

  3. Refresh Tokens: If your application was working previously and suddenly started throwing a 401 error, it might be due to an expired token. Ensure your application logic includes a mechanism to refresh the access token.

  4. Check Service Principal: Since you're using a service principal (application identity), ensure it's enabled for your Power BI tenant. This setting is available in the Power BI Admin Portal under Tenant settings > Developer settings. Service principals must be explicitly enabled here.





Best Regards,



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

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.


Fabric certifications survey

Certification feedback opportunity for the community.