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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
isabellasmou
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.

1 REPLY 1
v-jialongy-msft
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,

Jayleny

 

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors