Forum Discussion

MattPilWork's avatar
MattPilWork
New Member
1 year ago
Solved

Base URL in embedded report

We have a Power BI dashboard embedded in a the angular view provided by MS.  It has hyperlinks that open content in a sub-domain of our website (one per tenant).  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).

 

On the server side we make an embed token setting the report id, datasource id etc.  Most of our reports do NOT use RLS so we don't set the identity.

Reference: https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token 

 

On the client side we set the Report Settings including the embedURL including some custom filter values. 

Reference: https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings

 

In the dashboard we generate links on rows in a grid that say "Open" and have a hyperlink to https://tenant.domain.com/item/xxx   

 

The same report (pbix) is auto published to multiple tenants and has its data source dynamically changed (this was hard work and tempremental!).

 

The issue is the above url is hard coded to whatever tenant we first saved the PBIX against.  It needs to be either:

  • Dynamic - the published report 'detects' where its being viewed - the current browser url
  • Passed - we can send the base url through some configuration.

 

I'm struggling to find a way to do either....

 

For passing I have looked at RLS effective identity > CustomData  but we don't want RLS and people report this doesn't work anyhow.  I've also looked at the settings object above and can't see any way to pass extra data.

 

Suggestions please. Thanks, Matt

 

2 Replies