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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CoderCodingCode
Regular Visitor

PowerBI Server Reverse Proxy

Has anybody ever successfully setup a reverse proxy to an internal Power BI Server?   I'm trying to use IIS10 and URL Rewrite.  I want to make a few reports publically accessible without exposing the entire PowerBI server.

 

Basically I want users to visit a URL on my public web server and it will display one specific report on my private internal Power BI Rerport server.

 

Just curious if anybody has ever set this up before.

 

5 REPLIES 5
fimiki
New Member

I added a custom middleware class to our website that does this for our PowerBI Report Server using the code given in this article as a template.  It does a few more things, like inject basic auth credentials for anonymous access and manipulate the content of the response to hide or disable the PowerBI navigation items.  It took a solid week of effort, but I hadn't had much prior exposure to proxies or working with headers and cookie content.

Hello and welcome @fimiki ,

 

that sounds good. Unfortunately I don't understand much of coding classes. Maybe you can write a Technote or a guide how to do this.

 

Regards Xriz

Hi, was able to setup my reverse proxy. Now IIS proxies the request to the outside URL to my local server on which I have installed PBI Reporting Service.

I produced the following steps:

* Inside the Default Website I have added a new Application with the same path like I have configured for the Web Portal URL

* I created a rewrite rule:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="ReverseProxyInboundRule1" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="http://localhost/Reports/{R:1}" appendQueryString="true" />
                </rule>
                <rule name="ReverseProxyInboundRule2" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{CACHE_URL}" pattern="^(https?)://" />
                    </conditions>
                    <action type="Rewrite" url="{C:1}://localhost/Reports/{R:1}" />
                </rule>
            </rules>
        </rewrite>
        <!-- <staticContent> -->
            <!-- <mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" /> -->
        <!-- </staticContent> -->
    </system.webServer>
</configuration>

(Replace localhost with whatever IP or URL of the server hosting the web portal).

 

Then, it kind of worked.... I was able to browse the Web Portal and click here and there... However, when trying to open a report I ran into another issue:

 

Anmerkung 2020-06-29 095605.png

 

When opening a report a new request is made to www.url.de/powerbi/?queryblabla

When opening the same report locally it works, but the request shows this url: http://localhost/Reports/powerbi/?queryblabla

 

Apparently the rewritten URL is omitted at this stage and I am not fluent enough with IIS to also rewrite the URL to www.url.de/Reports/powerbi/?queryblabla

 

I am not sure whether or not this is the actual reason for the error. But I'd like to find out.

Xriz
Advocate I
Advocate I

Hello there,

 

I am trying to set up the same. Did you manage to realize your request @CoderCodingCode ?

Also trying to do the same. Were you guys able to achieve this?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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