cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Frequent Visitor

Re: PowerBI Server Reverse Proxy

Hello there,

 

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

Highlighted
New Member

Re: PowerBI Server Reverse Proxy

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

Highlighted
New Member

Re: PowerBI Server Reverse Proxy

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.

Highlighted
Frequent Visitor

Re: PowerBI Server Reverse Proxy

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

Highlighted
Regular Visitor

Re: PowerBI Server Reverse Proxy

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.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors