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
vivek_jain
Advocate II
Advocate II

Embedded power BI - Accessing powerbi iframe DOM object from application

Hi ,

 

I am using embedded powerbi into my application. Application manages its session time out based on the mouse clicks on the UI. When powerbi reports is embedded , we do not have control on the DOM document inside the embedded iframe. We need to get that control so that we can add event handling to take care of application session time outs ,etc. Basically, in my application, i am looking for a way by which I can access via javascript , the document html that is inside the embedded iframe of powerbi.

 

Thanks.

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @vivek_jain,

 

Followings are a list of events which can be handled Power BI JavaScript API.

 

Reports

loaded
	configuration
rendered
	Called when a report is fully rendered. For example, if all visuals are rendered on loading report or after user interaction.

pageChanged
	newPage: Page

filtersApplied (Not supported yet)
	filters

dataSelected
	report: Report
	page: Page
	visual: Visual (Will be defined)
	filters: IFilter[]
	dataPoints: (Array of data points)
		each point has:
		1) **identity** array
		2) **values** array (In Progress)

commandTriggered
       Raised when end user clicks on extension command.
       [Menu Commands Extension](https://github.com/Microsoft/PowerBI-JavaScript/wiki/Menu-Commands-Extension)

Dashboards

tileClicked
       Raised when end user clicks a tile. event properties are:
           tileId: id of clicked tile.
           reportEmbedUrl: Embed Url of the original report the tile created from (if any)
           pageName: name of the page the tile created from (if any)
           navigationUrl: Url which will be opened in powerbi.com if user clicks a tile.

In you scenario, you should be able to handling the rendered(which will be triggered after user interaction when a report is fully rendered) or tileClicked event to take care of application session time outs. Smiley Happy

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @vivek_jain,

 

Followings are a list of events which can be handled Power BI JavaScript API.

 

Reports

loaded
	configuration
rendered
	Called when a report is fully rendered. For example, if all visuals are rendered on loading report or after user interaction.

pageChanged
	newPage: Page

filtersApplied (Not supported yet)
	filters

dataSelected
	report: Report
	page: Page
	visual: Visual (Will be defined)
	filters: IFilter[]
	dataPoints: (Array of data points)
		each point has:
		1) **identity** array
		2) **values** array (In Progress)

commandTriggered
       Raised when end user clicks on extension command.
       [Menu Commands Extension](https://github.com/Microsoft/PowerBI-JavaScript/wiki/Menu-Commands-Extension)

Dashboards

tileClicked
       Raised when end user clicks a tile. event properties are:
           tileId: id of clicked tile.
           reportEmbedUrl: Embed Url of the original report the tile created from (if any)
           pageName: name of the page the tile created from (if any)
           navigationUrl: Url which will be opened in powerbi.com if user clicks a tile.

In you scenario, you should be able to handling the rendered(which will be triggered after user interaction when a report is fully rendered) or tileClicked event to take care of application session time outs. Smiley Happy

 

Regards

Thanks @v-ljerr-msft for the prompt response.

'rendered' event seems to work for my case.

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.