Error: We can't display this page (Not authorized)

Hi

I am getting the below error

my domain is whitelisted under Domains and Embedding option

below is my front end code


<head>
        <title>Dashboard Embedding Example</title>
      
        <script type="text/javascript">
            const embedDashboard = async () => {

                const {
                    createEmbeddingContext,
                } = QuickSightEmbedding;

                const embbedURL = '@ViewBag.embeddUlr';

                const embeddingContext = await createEmbeddingContext();

                const containerDiv = document.getElementById("embedding-container");

                const frameOptions = {
                    // replace the value below with the one generated via embedding API
                    url:embbedURL,
                    container: containerDiv,
                    height: "700px",
                    width: "1000px",
                };

                const contentOptions = {

                    locale: "en-US",

                    toolbarOptions: {
                        export: true,
                        undoRedo: true, // use this option to show or hide the undo and redo buttons
                        reset: true, // use this option to show or hide the  reset button
                    },
  
                    attributionOptions: {
                        overlayContent: true,
                    },
                };

                const embeddedDashboard = await embeddingContext.embedDashboard(frameOptions, contentOptions);
            };
        </script>
    </head>

    <body onload="embedDashboard()">
        <div id="embedding-container"></div>
    </body>

below is my backend code


public string GenerateEmbedUrlForRegisteredUserAsync()
        {
            var quicksightClient = new AmazonQuickSightClient(
                    awsAccessKeyId,
                    awsSecretAccessKey,
                    RegionEndpoint.USEast1);

            BookmarksConfigurations bookmarks = new BookmarksConfigurations { Enabled = true };

            StatePersistenceConfigurations statePersistenceConfigurations = new StatePersistenceConfigurations { Enabled = true };

            RegisteredUserDashboardFeatureConfigurations registeredUserDashboardFeatureConfigurations = new RegisteredUserDashboardFeatureConfigurations
            {
                Bookmarks = bookmarks,
                StatePersistence = statePersistenceConfigurations,
            };

            RegisteredUserDashboardEmbeddingConfiguration registeredUserDashboardEmbeddingConfiguration
            = new RegisteredUserDashboardEmbeddingConfiguration
            {
                InitialDashboardId = dashboardId,
                FeatureConfigurations = registeredUserDashboardFeatureConfigurations
           
            };

            RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration
            = new RegisteredUserEmbeddingExperienceConfiguration
            {
                Dashboard = registeredUserDashboardEmbeddingConfiguration
            };

            string url = quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest
            {
                AwsAccountId = accountId,
                ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration,
                UserArn = usrARN,
                SessionLifetimeInMinutes = 100
               

            }).Result.EmbedUrl;

            return url;

        }

I followed multiple tutorial but nothing worked

Hi @Saveen - This kind of issue is require some detail analysis. can you please raise a ticket to AWS customer support so that they can analyze the issue by screen share. To raise the request, please follow the link - Creating support cases and case management - AWS Support

Regards - Sanjeeb