I am looking to embed Power BI into a website and filter the report based on a parameter passed from the application/website. When a user logs into the website a session key is inserted into an on premise MS SQL table along with a list of customer locations the user has access to (same session key for many customer locations/id’s. Currently, the report that we are wanting to embed in the PBI Service has all of it’s data sources configured for Import data connectivity mode and gets refreshed daily (millions of rows). The data model does not have the users session key in it since this is dynamically created on the fly when a user logs into the application/website. My question is, assuming the application passes the session key as a parameter to the report, is it possible to use direct query to query the on premise data source (there is an existing gateway) to determine what customer location id’s the user is authorized to view based on the session key that was passed to the report and then filter the report to just those customer locations accordingly? The query that would be executed against the on premise data source can return 1-10K+ customer locations in less than 1 sec.
Thanks in advance for any advice!