I'm trying to embed dashboards on our company's site. I'm using .NET Core 2.1 and AWSSDK 3.3.1.12 We're running our site on AWS Lambda using API Gateway.
I've followed this 2 guides to set up permissions and set up an endpoint to get the Embed the Dashboard URL
I have managed to get the embed dashboard URL
var getDashboardUrl = await client.GetDashboardEmbedUrlAsync(new GetDashboardEmbedUrlRequest
{
AwsAccountId = awsAccountId,
IdentityType = EmbeddingIdentityType.QUICKSIGHT,
DashboardId = testDashboardId,
SessionLifetimeInMinutes = 100,
ResetDisabled = true,
UndoRedoDisabled = false,
Namespace = "default",
UserArn = $"arn:aws:quicksight:us-east-1:{awsAccountId}:user/default/{email}",
StatePersistenceEnabled = true
});
And used the Quicksight javascript SDK to embed the dashboard but I'm getting an error. It shows that is loading the dashboard but once loaded shows a message "We can't display this page (Not authorized)"
Error message that I get on our site
function embedDashboard(embedUrl) {
let containerDiv = document.getElementById("embeddingContainer");
let options = {
// replace this dummy url with the one generated via embedding API
url: embedUrl,
container: containerDiv,
scrolling: "no",
height: "700px",
width: "1000px",
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
}
Let me know if you need more info