RLS:- How to implement Row Level Security (RLS) with QuickSight embedded URL for non-QuickSight users

Hello Community,
In our project, we’re using QuickSight to display analytics in a website using embedded URLs with AWS SDK. Our tech stack consists of Node.js and React.js.
We’re pulling data from PostgreSQL DB into QuickSight and have an enterprise-level account. We’ve created analytics graphs and generated embedded URLs for dashboards which are rendered in iframes for anonymous users.
We have a new requirement: each user has a specific organization ID and partner ID. When users log into the React application, we generate an embedded URL. We need to pass the organization ID for the logged-in user so they only see analytics graphs for their organization, not all organizations.
We’ve set up RLS in QuickSight, but here’s the challenge: when users who aren’t registered in QuickSight log into the website, we need to pass their organization ID to the GeneratingEmbeddedUrl function so QuickSight can filter data and generate URLs specific to their organization.

const params =
{
AwsAccountId: process.env.AWS_ACCOUNT_ID,
DashboardId: dashboardId,
IdentityType: EmbeddingIdentityType.QUICKSIGHT,
SessionLifetimeInMinutes: 600,
UndoRedoDisabled: true,
ResetDisabled: true,
UserArn: process.env.AWS_USER_ARN,
Parameters: { origin_organization_id: [‘229’] // Matches RLS field
} };

const command = new GetDashboardEmbedUrlCommand(params); c
onst response = await this.quicksightClient.send(command);
return response.EmbedUrl;

I’m attaching a screenshot of the Row Level Security settings for our dataset. Any help would be appreciated.

Hi @Priya6698,

Welcome to the Quicksight Community and thank you for posting your question.

I think you need to use “Tag based” controls to implement RLS. I found this blog, could you please let me know if this helps you. This blog post provides a detailed walkthrough on setting up RLS using tags, allowing you to control data access for anonymous users based on their attributes.

Blog - Enable complex row-level security in embedded dashboards for non-provisioned users in Amazon QuickSight with OR-based tags | AWS Business Intelligence Blog

AWS DOC - Using row-level security with tag-based rules to restrict access to a dataset when embedding dashboards for anonymous users - Amazon QuickSight

AWS re:Post - Quicksight public access restrictions | AWS re:Post

Thank you,
Shravya

2 Likes