Forum Discussion

nmilya's avatar
nmilya
Data Storage
03-28-2025
Solved

Embedded Dashboard - Failure on load

I use SDK Compose to display embedded dashboard in my React app. As an auth I use Api Token . When I am trying to display embedded dashboard via DashboardById component on my localhost it fails with an error.  Dashboard id is sued properly, dashboard exists and work well if yo reach it via Sisense -> Analytics. Also API token works properly as well - Sisense auths with it on app's load.


This is my code:

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);

root.render(
<React.StrictMode>
<SisenseContextProvider url='https://myapp.sisense.com' token='eyJhbGciOiJIUzI1NiIsInR5cCI...' >
<App />
</SisenseContextProvider>
</React.StrictMode>
);

in App:

<DashboardById dashboardOid="67dc5d2bf2594c003311a8ad" />

I also tried to display the same dashboard via <iframe>, in that case it fail show login page in embedded view and once I pass the auth it fails dashboard loading with "401 unauthorized" error:

I tried http and https localhosts, but it doesn't effect,Embedded code is on in settings, host is also added to the list to pass cors. What could be an issue?

 

5 Replies

  • steve's avatar
    steve
    Sisense Employee

    hi nmilya 

    please could you raise a support ticket for this one, since we don't want to ask for further troubleshooting data to be posted in a public forum. if you can include on the ticker a HAR file containing the captured network traffic from the browser while reproducing this problem, that could help the team.

    If I had to take a wild guess, it would be to ensure you're not also setting ssoEnabled=true on the SisenseContextProvider, but our support team can help futher.

    Thanks

    Steve

  • Hi nmilya,

    Were you able to work with support on this? If so, what was the result?

  • I've also noticed this when embedding an iframe. The login page loads, I login, then the dashboard fails to load with several 401 errors.