Embed Dashboard on external web page not working

<!DOCTYPE html>
<html>
<body>

<h2>HTML Iframes</h2>
<p>You can use the height and width attributes to specify the size of the iframe:</p>

<iframe src="http://localhost:5601/app/dashboards#/view/d56cf930-0720-11ed-81a0-c3ff0f5dc31a?auth_provider_hint=anonymous1#/elasticsearch/nodes?embed=true&_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-7d,to:now))&_a=(description:'',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(attributes:(references:!((id:'36642860-f2ec-11ec-83a1-4178a3c10090',name:indexpattern-datasource-current-indexpattern,type:index-pattern),(id:'36642860-f2ec-11ec-83a1-4178a3c10090',name:indexpattern-datasource-layer-e62d4ee8-b37f-4675-a346-15c86855054d,type:index-pattern)),state:(datasourceStates:(indexpattern:(layers:(e62d4ee8-b37f-4675-a346-15c86855054d:(columnOrder:!('7c1c79c5-b13c-46fb-aced-baef5126431b','21dbdbb4-5b7a-46d3-a87a-304a686ec9a8'),columns:('21dbdbb4-5b7a-46d3-a87a-304a686ec9a8':(dataType:number,isBucketed:!f,label:'Count%20of%20records',operationType:count,scale:ratio,sourceField:Records),'7c1c79c5-b13c-46fb-aced-baef5126431b':(dataType:string,isBucketed:!t,label:'Top%20values%20of%20action.keyword',operationType:terms,params:(missingBucket:!f,orderBy:(columnId:'21dbdbb4-5b7a-46d3-a87a-304a686ec9a8',type:column),orderDirection:desc,otherBucket:!t,size:5),scale:ordinal,sourceField:action.keyword)),incompleteColumns:())))),filters:!(),query:(language:kuery,query:''),visualization:(axisTitlesVisibilitySettings:(x:!t,yLeft:!t,yRight:!t),fittingFunction:None,gridlinesVisibilitySettings:(x:!t,yLeft:!t,yRight:!t),layers:!((accessors:!('21dbdbb4-5b7a-46d3-a87a-304a686ec9a8'),layerId:e62d4ee8-b37f-4675-a346-15c86855054d,position:top,seriesType:bar_stacked,showGridlines:!f,xAccessor:'7c1c79c5-b13c-46fb-aced-baef5126431b')),legend:(isVisible:!t,position:right),preferredSeriesType:bar_stacked,tickLabelsVisibilitySettings:(x:!t,yLeft:!t,yRight:!t),valueLabels:hide)),title:'',type:lens,visualizationType:lnsXY),enhancements:()),gridData:(h:15,i:c97c3688-ae24-449a-80d0-8c4fad65843d,w:24,x:0,y:0),panelIndex:c97c3688-ae24-449a-80d0-8c4fad65843d,type:lens,version:'7.13.2'),(embeddableConfig:(attributes:(references:!((id:'36642860-f2ec-11ec-83a1-4178a3c10090',name:indexpattern-datasource-current-indexpattern,type:index-pattern),(id:'36642860-f2ec-11ec-83a1-4178a3c10090',name:indexpattern-datasource-layer-4e3e3f9e-2b53-41fa-8b51-ad7db73e4301,type:index-pattern)),state:(datasourceStates:(indexpattern:(layers:('4e3e3f9e-2b53-41fa-8b51-ad7db73e4301':(columnOrder:!('16c5ca50-a7cd-45cd-aca6-fd6fa665c1ac',c0d731b8-2705-4353-a138-b0adbf2878ae,dced552c-c860-4209-8b34-219207f9760e),columns:('16c5ca50-a7cd-45cd-aca6-fd6fa665c1ac':(dataType:date,isBucketed:!t,label:timestamp,operationType:date_histogram,params:(interval:auto),scale:interval,sourceField:timestamp),c0d731b8-2705-4353-a138-b0adbf2878ae:(dataType:number,isBucketed:!f,label:'Median%20of%20hours',operationType:median,scale:ratio,sourceField:hours),dced552c-c860-4209-8b34-219207f9760e:(dataType:number,isBucketed:!f,label:'Median%20of%20callDuration',operationType:median,scale:ratio,sourceField:callDuration)),incompleteColumns:())))),filters:!(),query:(language:kuery,query:''),visualization:(axisTitlesVisibilitySettings:(x:!t,yLeft:!t,yRight:!t),fittingFunction:None,gridlinesVisibilitySettings:(x:!t,yLeft:!t,yRight:!t),layers:!((accessors:!(c0d731b8-2705-4353-a138-b0adbf2878ae,dced552c-c860-4209-8b34-219207f9760e),layerId:'4e3e3f9e-2b53-41fa-8b51-ad7db73e4301',position:top,seriesType:bar_stacked,showGridlines:!f,xAccessor:'16c5ca50-a7cd-45cd-aca6-fd6fa665c1ac')),legend:(isVisible:!t,position:right),preferredSeriesType:bar_stacked,tickLabelsVisibilitySettings:(x:!t,yLeft:!t,yRight:!t),valueLabels:hide)),title:'',type:lens,visualizationType:lnsXY),enhancements:()),gridData:(h:15,i:fb79e8c6-7193-4e1e-88f6-be025a2cca3c,w:24,x:24,y:0),panelIndex:fb79e8c6-7193-4e1e-88f6-be025a2cca3c,type:lens,version:'7.13.2')),query:(language:kuery,query:''),tags:!(),timeRestore:!f,title:test1-dash1,viewMode:view)" height="600" width="800"></iframe>
</html>

When I try to embed an iframe into my application. It's trying to login but not logging in and doesn't show the dashboards. But I try to do some changes according to elastic discussions. But not work. I need to know is there any option to solve this or version which I used is not good.
My version is elasticsearch-7.13.2

What we recommend for iframe instead of the common proxy hacks is to use anonymous authentication for it: Anonymous access · Issue #18331 · elastic/kibana · GitHub

How it works and how to use is pretty well explained in this PR that introduces it: Implement AnonymousAuthenticationProvider. by azasypkin · Pull Request #79985 · elastic/kibana · GitHub

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.