Error while Embedding Dashboard with internal application

Hi All,

I am trying to embed dashboard in our internal application, I have given the required IAM permissions to the role, added the domain name and I am generating the embedded URL through cloudshell by making the below call

aws quicksight get-dashboard-embed-url --region us-east-1 --namespace default --dashboard-id jdfieieuthd-fi4ur–********* --identity-type ANONYMOUS --aws-account-id #######

I am receiving the embed URL, but when using it on the application page it gives the below error

“Embedding failed because of invalid URL or authorization code. Both of these must be valid and the authorization code must not be expired for embedding to work.”

Can anyone please help me with it?

Thanks in advance.

1 Like

Hello @riya-fale, just to clarify, are you running this command in the AWS command line and then pasting the URL in your code? The URL that is created with that command is a one time use URL that expires after 5 minutes. It is something that you will need to call and generate every time a user wants to view the application. I would recommend looking at the QuickSight boto3 SDK documentation to make the call through the back-end of your application.

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/quicksight/client/generate_embed_url_for_anonymous_user.html

Let me know if this helps!

Hi Dylan,

Thanks for the response.
Even if I use AWS CLI and paste the link in the HTML code, that should work, right?

Hello @riya-fale, if you complete it within the 5 minute time frame and don’t click it before it loads in the application, theoretically it should work. This process would not work for a deployed application though, just a single use test when running it locally.

Hi Dylan,

Thanks for your help.
I raised a ticket with AWS for this, there was some missing IAM permissions. It is working now.

Thank you!

1 Like