<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Base URL in embedded report in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Base-URL-in-embedded-report/m-p/4135645#M55134</link>
    <description>&lt;P&gt;Thanks for the response. Yes we want urls that point to the specific tenants domain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a restless&amp;nbsp;night I found a solution....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In PowerBI we modified our urls to have a placeholder for the base url e.g. &lt;A href="http://www.BASE.URL/api/xxxxx" target="_blank"&gt;www.BASE.URL/api/xxxxx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We changed the default hyperlink behaviour to RaiseEvent and not open the urls.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#hyperlink-click-behavior" target="_blank"&gt;https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#hyperlink-click-behavior&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We then attached a handler to the dataHyperlinkClicked event:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events#datahyperlinkclicked" target="_blank"&gt;https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events#datahyperlinkclicked&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This handler then replaced "base.url" with the browsers current domain and opens it in a new window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This achieves the required functionality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 14:17:35 GMT</pubDate>
    <dc:creator>MattPilWork</dc:creator>
    <dc:date>2024-09-05T14:17:35Z</dc:date>
    <item>
      <title>Base URL in embedded report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Base-URL-in-embedded-report/m-p/4133081#M55103</link>
      <description>&lt;P&gt;We have a Power BI dashboard embedded in a the angular view provided by MS.&amp;nbsp; It has hyperlinks that open content in a sub-domain of our website (one per tenant).&amp;nbsp; I need the base url of that link to be set via configuration or dynamically detected as the url is different per tenant and I don't want to manually republish every 'instance' of my dashboard (currently auto deployed).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the server side we make an embed token setting the report id, datasource id etc.&amp;nbsp; Most of our reports do NOT use RLS so we don't set the identity.&lt;/P&gt;&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the client side we set the Report Settings including the embedURL including some custom filter values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the dashboard we generate links on rows in a grid that say "Open" and have a hyperlink to &lt;A href="https://tenant.domain.com/item/xxx" target="_blank" rel="noopener"&gt;https://tenant.domain.com/item/xxx&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same report (pbix) is auto published to multiple tenants and has its data source dynamically changed (this was hard work and tempremental!).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is the above url is hard coded to whatever tenant we first saved the PBIX against.&amp;nbsp; It needs to be either:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dynamic - the published report 'detects' where its being viewed - the current browser url&lt;/LI&gt;&lt;LI&gt;Passed - we can send the base url through some configuration.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling&amp;nbsp;to find a way to do either....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For passing I have looked at RLS effective identity&amp;nbsp;&amp;gt; CustomData&amp;nbsp; but we don't want RLS and people&amp;nbsp;report this doesn't work anyhow.&amp;nbsp; I've also looked at the settings object above and can't see any way to pass extra data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggestions please. Thanks, Matt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 10:02:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Base-URL-in-embedded-report/m-p/4133081#M55103</guid>
      <dc:creator>MattPilWork</dc:creator>
      <dc:date>2024-09-04T10:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Base URL in embedded report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Base-URL-in-embedded-report/m-p/4134916#M55125</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/801336"&gt;@MattPilWork&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your statement, I think your requirement is to link to report dynamicly based on user and tenant.&lt;/P&gt;
&lt;P&gt;As far as I know, the pbi report does not contain methods to extract data from external parameters (urlstring, seession, cookie, etc.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 07:18:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Base-URL-in-embedded-report/m-p/4134916#M55125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-05T07:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Base URL in embedded report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Base-URL-in-embedded-report/m-p/4135645#M55134</link>
      <description>&lt;P&gt;Thanks for the response. Yes we want urls that point to the specific tenants domain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a restless&amp;nbsp;night I found a solution....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In PowerBI we modified our urls to have a placeholder for the base url e.g. &lt;A href="http://www.BASE.URL/api/xxxxx" target="_blank"&gt;www.BASE.URL/api/xxxxx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We changed the default hyperlink behaviour to RaiseEvent and not open the urls.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#hyperlink-click-behavior" target="_blank"&gt;https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#hyperlink-click-behavior&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We then attached a handler to the dataHyperlinkClicked event:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events#datahyperlinkclicked" target="_blank"&gt;https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events#datahyperlinkclicked&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This handler then replaced "base.url" with the browsers current domain and opens it in a new window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This achieves the required functionality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 14:17:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Base-URL-in-embedded-report/m-p/4135645#M55134</guid>
      <dc:creator>MattPilWork</dc:creator>
      <dc:date>2024-09-05T14:17:35Z</dc:date>
    </item>
  </channel>
</rss>

