Different report by logged in user - powerbi

I am new to PowerBI and I have a project where I store my data on MySQL( or I will use MSSQL) server. Each user has a defined ID. Is it possible to create a user login or something like that that would show reports for different users?
Login screen with powerBI shortcode will be on my website and I would like to show powerBi report by logged user. Report screen will be the same every time, but with different numbers for different user.
I am sorry for this question, but I am new to powerBI. Is it even possible to create something like this?
Thanks for any help.

You can take a look at Row-level security.
Row-level security (RLS) allows you to restrict logged in user's access to report's data, i.e. you can show different part of your data based on logged in user.
You can setup RLS in Power BI Desktop. You can create different roles that can be assigned by generating the embed token while embedding.
Refer docs: https://learn.microsoft.com/en-us/power-bi/admin/service-admin-rls
While embedding, generate embed token based on the user who has logged in and assign the roles to it. Refer docs: https://learn.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security

Related

Show dashboard conditionally based on authenticated user in power bi

I have the following use case, and I appreciate that this is probably not how power-bi is intended:
I'd like a template dashboard. For which the data supplied and viewed differs per authenticated user.
A user logs in with a token via oath. This contains information on the type of dashboard he is allowed to view. When he is logged in, a query should be ran and display his data in the template dashboard.
When another user logs in (with another id), the same query is run (with different arguments/params, based on his id), but retrieves different data. It is then displayed against the same template dashboard.
Is this at all a feasible use-case in power-bi. And if it isn't, what tooling does offer this option? It seems like most dashboarding tools are tailored towards having a single set of enterprise users, use the platform for management information.
Sounds like you are after Row-Level Security functionality in Power BI. A good place to start is by reading the documentation:
https://learn.microsoft.com/en-us/power-bi/admin/service-admin-rls

Dataset security for embedded Power BI dashboard

We embed a Power BI dashboard in a site. We currently protect some tables using RLS. There are however some tables that also contains data not everyone may see, but we cannot protect using a simple DAX expression.
My question is whether this data is secure as long as we don't expose any component in the dashboard that displays this data? Or is there maybe a way for someone to get around the components and directly query the underlying dataset?
It depends how is this dashboard embedded. If you are using the JS client with the API, and the user who see the report has rights to edit or create, then it could change the report and access the data in the tables not currently exposed in the existing one. If the user has rights only to view it, then the data is safe.
So if you are using user owns data scenario, make sure that users has only view rights on the report. If you are using app owns data scenario, make sure the embed token is generated with view rights only (i.e. token access level is view).
Another option to access arbitrary data is the Q&A visual.

Power BI Embedded Report Picker

I have an embedded site for my users to view a report. I have one master login for Power BI that all customers are routed through.
Authentication and the request are done through a .NET backend using PowerBI.Api.V2. Everything works well when I hardcode a single reportId and embed the fullscreen iframe.
My question is for customers that have multiple reports; Is there a built in report-picker-report that I can embed where the report selection is already handled for me? Or should I work on building an interface after retrieving the list of reports my users can pick from?
No, there are no built-in pickers. Power BI provides an API interface and you must implement these for yourself. Of course, you can build these pickers and make them available for us :)
To get list of workspaces you need to call Get Groups. This will give you a list of user's workspaces. You can show their name property values to the user, but you will need their id (the guid). When you know the id of a workspace, you can list the reports in it by calling Get Reports In Group. The same way you can call Get Dashboards In Group and Get Tiles In Group.

Is there a way to pre-filter a powerBI report server side?

I have uploaded a report, and using the .net SDK I've embedded said report into my website. However we show private data for many organizations. If I edit the reports iframe url to filter the report by the users org id so they can only see data for their organization then that ends up being a URL you can edit in javascript on the client side so a use could put another id there and view some other organizations data.
Is there any way possible to filter the data a report shows before it is sent client side?
I know you can edit the report file it'self but if you have hundreds of organizations, you'd need 100 copies of the same report which is obviously a maintenance and upkeep nightmare.
I would use the "Row Level Security" (RLS) feature for this requirement. Basically you set up roles, assign users to them and assign DAX expressions to them to filter the data.
There's a good explanation of it here:
https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-rls/
The most efficient design of RLS (from a coding and admin perspective) is if you can feed in a username variable and filter your data by that (as shown in that example).

How can you find out the identity of the logged in user on Power BI iPad App

How can you find out the identity of the logged in user on the Power BI iPad App? The user needs to be logged into Power BI for them to access the reports.
I want to be able to change the filters for the Power BI reports based on the user.
If I can find out who it is or some identifying information such as email address, then that would be ideal.
Right now Power BI doesn't support dynamic slicers like you're asking about. You could suggest this in the PowerBI forums or the at the ideas forum.
That said, you could look in to implementing Row Level Security to achieve what you're trying to accomplish.
What you are asking is to implement Dynamic Row Level Security.
Model:
User Table: Table that contains user detail along with the field on which we will apply security(here email field).
Country Table: Table containing columns to be filtered and contains column used in slicer.
User Country Bridge: Bridge table that contains permission details, for example user id x having access to country y and z.
Defining RLS(Row Level Security):
In Modelling -> Manage Roles, create a new role on Email of User Table by this DAX query which returns the email id of logged in user.
[Email] = userprincipalname()
Finalizing:
Go to PowerBI Service -> Dataset -> Security and add users to the roles created.
In this manner it becomes easy to maintain roles and security by just modifying the bridge table that stores all permission details.