web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unauthorized error for...
Power Automate
Suggested Answer

Unauthorized error for 'Export To File for Paginated Reports' action

(1) ShareShare
ReportReport
Posted on by 7
Hi,

I’m encountering an “Unauthorized” error with the action ‘Export_To_File_for_Paginated_Reports’. A different error message on the top states: “Action ‘Export_To_File_for_Paginated_Reports’ failed: The response is not in a JSON format.” which I believe is due to the Unauthorized statusCode 401 error.

Interestingly, when I use ‘Export To File for Power BI Reports’ in the same workspace, it works without any issues. Both the Power BI report and the Paginated Report are based on the same semantic model.

I’m not sure why this discrepancy is occurring.

Thank you in advance for your assistance.
Categories:
I have the same question (0)
  • Suggested answer
    RobotRising Profile Picture
    402 on at

    The issue you're facing likely stems from differences in permissions and configuration between Power BI reports and Paginated Reports in Power Automate and Power BI.

    Here’s a breakdown of potential causes and solutions for the error:

    1. Differences in API Permissions for Paginated Reports

    Paginated reports and Power BI reports, even though they may use the same semantic model, are managed differently within Power BI. Specifically:

    • Paginated Reports require additional permissions beyond what is needed for regular Power BI reports.
    • Ensure that the user account running the Power Automate flow has the appropriate permissions to access and export Paginated Reports. This is crucial because Paginated Reports use different APIs (related to SSRS and paginated report services).

    Steps to Verify Permissions:

    • Go to Power BI Service and navigate to the workspace containing the Paginated Report.
    • Confirm that the user has the correct roles (e.g., Member, Admin) in that workspace and explicit permissions on the Paginated Report.
    • Check if the user running the flow has at least Read and Export permissions for the Paginated Report specifically.

    Possible Solution:

    • If permissions are missing, you can add the necessary Export permissions for the Paginated Reports at both the workspace level and the report level. This might involve asking your Power BI administrator to configure these permissions.

    2. Different Licensing Requirements for Paginated Reports

    Paginated Reports often require additional licensing compared to regular Power BI reports. While regular reports can run on Power BI Pro or Premium Per User (PPU) licenses, Paginated Reports often require a Power BI Premium capacity to export.

    Check Licensing:

    • Make sure that the workspace where your Paginated Report is located is backed by a Premium capacity.
    • Additionally, ensure that the user account executing the flow has access to this Premium capacity.

    Possible Solution:

    • If the workspace isn't on a Premium capacity, and you don't have a PPU license, upgrading the workspace to Premium or purchasing the required license might resolve the issue.

    3. API Differences Between "Export To File" for Regular Reports and Paginated Reports

    Even though both the "Export To File for Power BI Reports" and "Export_To_File_for_Paginated_Reports" actions exist, they may use different backend APIs and handle security tokens differently.

    Why This Matters:

    • Paginated Reports use the Power BI Paginated Report API, which may handle authentication differently from regular Power BI reports.
    • The 401 Unauthorized error suggests an authentication issue where the OAuth token used by Power Automate is not authorized to access the Paginated Reports API.

    Possible Solution:

    • Try re-authenticating the connection in Power Automate by:
      • Going to Data > Connections in Power Automate.
      • Finding the Power BI connection used in your flow.
      • Re-authenticate or refresh the connection and ensure the user account has the right permissions (particularly for Paginated Reports).
    • Check the authentication method being used by Power Automate for Paginated Reports and ensure that it's allowed by your organization's policy (e.g., OAuth token might be failing due to the way Paginated Reports APIs are handling the token).

    4. Workspace Access Control Settings

    If your Paginated Report is located in a different workspace from the regular Power BI reports, check the access control settings for that workspace:

    • Go to the workspace in the Power BI Service.
    • Ensure that the workspace settings, particularly for API access, are configured similarly for both regular and paginated reports.
    • Test exporting the Paginated Report manually from Power BI to confirm if any configuration or export limits apply.

    5. Ensure API Limits or Security Restrictions Are Not Blocking the Action

    The 401 error might also indicate that something in the Power BI service is blocking the API request:

    • Check if there are any API rate limits or security policies applied that may prevent the "Export_To_File_for_Paginated_Reports" action from being executed.
    • Verify that the tenant settings in Power BI Admin Center allow the export of paginated reports through APIs.

    6. Debugging the Response Format Issue (Non-JSON)

    The error message about the response not being in JSON format likely stems from the 401 Unauthorized error. Since the unauthorized status code is being returned in HTML (not JSON), Power Automate is having trouble parsing the response. Once the 401 issue is resolved, the response format issue should go away.

    Summary of Possible Steps to Resolve:

    1. Verify Permissions for accessing and exporting Paginated Reports (ensure Export and Read permissions).
    2. Check licensing requirements—ensure that you're using Power BI Premium or have the appropriate PPU license.
    3. Re-authenticate the connection in Power Automate for both Power BI and Paginated Reports.
    4. Test the API manually by exporting the Paginated Report directly from Power BI to confirm configuration.
    5. Review workspace and API access settings for any restrictions related to Paginated Reports.
  • pb111 Profile Picture
    7 on at
    Hi RobotRising, thank you for your suggestions. I tried all the possible steps and unfortunately still go the same error message.
     
    Only other thing I can think of is that the paginated report is in "My Workspace" in Power Bi which is in a trail premium capacity. Not sure if the trail period is the reason.
  • FW-12100647-0 Profile Picture
    2 on at
    Hello, I face the same question with you ,and my workspace is Premium.
  • Suggested answer
    WS-22072148-0 Profile Picture
    21 on at
    I had the exact some issue.  I moved the report to another workspace (not My Workspace) and it worked.  I do currently have a premium trial account, so you will need at least a Premium Per User license for Power BI I beleive.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard