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

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.

Related

After using Custom Authorization in Power BI report server, I cannot add the group in the Row level security section

After use Custom Authorization in power bi report server in Row level security part cannot assign group of database And also I checked the codes of Authorization.cs, AuthenticationUtilities.cs and AuthenticationExtension.cs classes, I didn't find a method related to Row level security that I can develop.
I was able to develop the security part that checks the permission of each report based on the group and users of my database, but I ran into trouble in the Row level security part and I did not find a method to develop.
there is no way to handle groups in RLS in custom auth.
https://github.com/microsoft/Reporting-Services/issues/188
and
If you're using custom authentication in Power BI Report Server, [USERNAME()] returns the username format you’ve set up for users.
Row-level security (RLS) in Power BI Report Server
So in your model you set up RLS rules based on the username format you passed from your custom auth extension.

Different report by logged in user

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

How does RLS behave when user does not match record in users table?

Suppose I have sales and users table. The sales table has userid to link to the users table.
Dynamic RLS filter is configured on the users table's email column:
Email = USERNAME()
There is a role called User and I have added couple of users to it via the power bi service.
Hence whenever a user logs in he can see his own sales data.
However, when a user is a member of the User group but there is no record for that user in the Users table, then when he logs in there will be no filter applied because that email doesn't exist in the users table. Thus the user can see everyones data?
What is the workaround for this?
For those people not in a mapping table for RLS, they will not see any data.
You can test this in Power BI Desktop
For example in my mapping table of users, which link to customer, then to the data, I have two users:
And each user can see the the following customers
So if I view as the role as 'some.one#domain.com' I'll see only the data mapped to that user.
However if I set it as 'some.three#domain.com', you don't see anything.
In the Service you have to added the users to roles as set up in the dataset security setting, if your not in the role in the service, you get a security warning:
If you are in the role, but are not in your mapping table, it will return no data, like it would in Power BI Desktop.
Please note: for RLS to work, the users must be in the 'Viewer' role at the workspace level. If they are Admin, Member or Contributor, they will be able to see all the data.

PowerBI for AD guest users

I have a PowerBI report I want to share with a Guest user of my AD.
I have provided a PowerBI license for this guest user and created a tab in a Teams channel. Unfortunately, he is not able to open the PowerBI report, he got a "The content isn't available".
What is the issue? Is it possible to assign a license to a guest user?
You have two options:
If you want the guest user to just consume the report, then you can share the dashboard with their external email address and they get an email invitation as described here.
If you want the guest user to author the report, then the user needs to sign in specifically to your Power BI tenant. This article and the documentation walk through the steps to find your tenant URL.

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).