Error 403 - Power BI ExportToFile API

Gianfranco Coppola (MSC Sorrento) 65 Punti di reputazione
2025-11-14T08:33:24.8166667+00:00

Hello,

I am trying to export a published Power BI report to PDF using the ExportToFile REST API from a Java Spring Boot application. The goal is to automate the PDF generation without user interaction.

What I am doing:

  • Calling the API to obtain an access token using:
  • client_id
    • client_secret
    • grant_type = client_credentials
    • scope = https://analysis.windows.net/powerbi/api/.default
  • Using the token to call POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo.

Problem: The API call consistently returns 403 Forbidden.

What we tried:

Question:

  • Are we missing something in the configuration?
  • How can we correctly assign Application permissions for Power BI Service to allow the ExportToFile API to work?

Any guidance or clarification would be greatly appreciated.

Servizi cloud di Azure
Servizi cloud di Azure

Offerta di piattaforma distribuita come servizio di Azure usata per distribuire applicazioni Web e cloud.


Risposta

Le risposte possono essere contrassegnate come "Accettata" dall'autore della domanda e "Consigliata" dai moderatori, in modo da consentire agli utenti di sapere che la risposta ha risolto il problema dell'autore.