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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jesikamaurya
Frequent Visitor

Query: Power BI Custom Visual API Block – GPT/Gemini Integration Issue

I’m working on integrating ChatGPT or Google Gemini into Power BI using a custom visual to enable interactive AI responses directly from the report, based on the dataset contents.

Everything works fine when I test the API in Postman, but Power BI blocks the API call from the custom visual due to security restrictions, most likely related to Content Security Policy (CSP) or cross-origin (CORS) issues.

 

I’ve Tried So Far 

  1. Built a custom visual in Power BI using React and TypeScript

  2. Integrated OpenAI/Gemini API logic inside the visual

  3. Created a proxy API server to forward the API requests

  4. Used tunneling tools like:

    • Localtunnel

    • ngrok

    • Cloudflare Tunnel

But unfortunately, the API calls are still being blocked when the custom visual is rendered inside Power BI Desktop

 

I Need Help With

  • How can I successfully connect Power BI custom visual to OpenAI/Gemini API through a proxy or tunnel?

  • Is there a recommended tunneling or reverse proxy approach that works with Power BI visuals?

  • Any other approaches to solve the problem.

 

Please share your thoughts.

Any guidance or step-by-step solution would be greatly appreciated!


Thanks!

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors