Forum Discussion

dmriv's avatar
dmriv
Regular Visitor
1 year ago
Solved

Exporting PBI Page to PDF with Power Automate

Hello, I have a use case in which I need a defined group of users to be able to have view access to a Power BI report which will contain the Power Automate button visual to trigger a flow. This fl...
  • v-dineshya's avatar
    1 year ago

    Hi dmriv ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    You are running into some permission issues when trying to export a Power BI report to PDF using Power Automate. The error message "PowerBINotAuthorizedException", typically indicates that you are attempting to run the flow does not have the necessary permissions on the Power BI workspace where the report resides.

     

    Please try below things to fix the issue.

     

    1. Create a service account with access to the workspace. Use Power Automate with Power BI REST API and Azure AD app registration to authenticate as the service account. The flow runs under the service account, not triggering user.

     

    2. If feasible, convert your report page to a Paginated Report, It support more flexible export options and can be triggered without requiring workspace access for the end user.

     

    3. Embed the Power BI report in a Power Apps app. Use a Power Apps button to trigger the flow. The flow can run under a fixed connection, bypassing user permission issues.

     

    4. Save the exported PDF to a SharePoint folder the user has access to. Send a link to the file instead of attaching it directly.

     

    5. Publish the report as part of a Power BI App. Grant users access to the app and workspace via App permissions, which might help depending on your tenant setup.

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh