Looker Studio - Filter Data by Viewer Email

Hello!

We had an issue where the “Consent Required” dialog does not work when adding viewer email data filtering to a Looker Studio report.

We have a report in Looker Studio, where the primary data sources come from BigQuery. We need to restrict data access at the row level for users. To achieve this, we created a table with a list of allowed data by email and are using the “Filter by viewer’s email address” feature. The table was created in BigQuery and then transferred to Google Sheets, which is connected to Looker Studio as a data source.

The problem is that for users with Viewer access, the permission to view their the email address does not work. When they click “Allow” in the consent dialog, the permission is not applied. The user does not see any data, and the dialog keeps reappearing.

For users with Editor access, the permission is applied, but only after reconnecting the data source with the access control list (via Manage Added Data Sources → Edit Connection → Reconnect).

What needs to be done to make email-based data access work for Viewer users?

Hi Tatiana, maybe you can use the following function in bigquery at the view level: session_user(). Example:

SELECT
*
FROM
proyect.dataset.table
WHERE
EMAIL_TO_VALIDATE_DATA = SESSION_USER()

Thanks for the reply. I could try this option for sources from bigquery, but in this report we also have another dashboard with a data source from google sheets - this method will not work for it, I would like to find a common solution for them.

This solution worked for us:

We need to add some chart on the dashboard where viewer_email from a separate source with access table will be specified. Then dashboard users need to click “Allow” to grant permission to view their email specifically on this char. Only then does access work.

If users click “Allow” on any other chart with data from a blended source (with report data and access control table), the access doesn’t work.

This is very unintuitive, not described in the documentation, and overall seems like a bug. However, this is the only way we’ve found to make it work for now.

1 Like