Quicksight - Passing Parameter from Embedding to the Console / Analysis

Hi All,

Please note that I have the following case:

Is there a way that we should use to pass the parameter from the embedding to the quicksight console?

Thanks,
Rami

Hi @rahmadieh

Please use the QuickSight Javascript SDK to set the parameter values when embedding QuickSight dashboard in a web application .

You can find the example code here

Thanks
VInod

1 Like

Thank you @apjvinod for your reply.

Please note that we are not directly embedding the Dashboard in the we application we are embedding the console where we are opening the Dashboards from it using

GetSessionEmbedUrlResponse sessionEmbedUrlResponse = quickSightClient.getSessionEmbedUrl(
GetSessionEmbedUrlRequest.builder()
.awsAccountId(awsAccountId)
.sessionLifetimeInMinutes(600L)
.userArn(userArnOrUsername)
.entryPoint(“/start/dashboard”)
.build()
);

String sessionUrl = sessionEmbedUrlResponse.embedUrl() + “&p.xparamTenant=1111”;

with this and adding the parameter to the sessionURL being generated the param is not being sent to the dashboard or the analysis.

@rahmadieh

Parameter scope is within the dashboard only , hence we wont be able to set the parameter while accessing the console . If you could share bit more detail on the use case will be helpful to recommend on the approach .

By looking at the name of parameter [Tenant] … are you trying to design multiple tenant application with console embedding for Authors ?

Thanks
VInod

Hi @apjvinod ,

Yes I am trying to create an Analysis that uses a dataset but we don’t want all the data to appear and for that we have a parameter on the level of the dataset that is passed as Tenant Id, now for this case we could have used RLS but in different scenarios we will need this tenant id to be available so for that reason we are trying to pass the parameter when embedding the URL to the console so that when the user selects the analysis the data will be filtered as needed.

Regards,
Rami

Hi @rahmadieh

Thanks for sharing additional details as of today best & secure way is to enforce the RLS on the datasets and create required Namespace in QuickSight for each/group of Tenant’s to restrict what each tenant user can see it and share . If you could share the additional details on different scenarios where you will see need of Tenant id , will be helpful to create a internal product feature request .

Thanks
Vinod

Thanks
Vinod

Hi @apjvinod

Yes, you are right about the Row-Level Security (RLS) for this case.

However, for example, consider a scenario where a dataset takes a parameter flag, let’s say xparamAgentType:

  • This parameter will receive the type of the Agent (e.g., “payee”, “party”, “salesman”, etc.).
  • The parameter will be sent from the web application.
  • We expect the dataset to be filtered based on this type.

In this case, we encounter the same issue where the parameter cannot be sent to the console. When the analysis is opened from the QuickSight console, the parameter will be unavailable, leading to unexpected data being displayed.

Looking forward to your thoughts on how best to handle this.

Regards,
Rami

1 Like

Hi @apjvinod ,

Please can you let me know if the example provided is clear and it is enough to consider as an improvement to be added to Quicksight.

Regards,

Hello @rahmadieh, since this functionality is not currently available within the embedded QuickSight console, I will tag this topic as a feature request. I would also suggest that if this functionality is business critical, I would recommend utilizing a work-around solution to accomplish this task for now. Either setting up RLS for the dataset to ensure the users only have access to the proper tenant id or embedding individual dashboards rather than the entire QuickSight console. Those are going to be the only options to accomplish this task at the moment.

I’ll mark my response as the solution, but please let me know if you have any remaining questions. Thank you!

1 Like