- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Importing a list of users with roles - Possible?
Hi,
Below is the issue I have - would appreciate any help.
I wonder if it is possible to automatically import a list of users with their roles and make PowerBi assign them to these users.
I would import a table like:
User1 | Role1 |
User2 | Role2 |
User3 | Role1 |
from my database to a model in PowerBI. Is there a way for PowerBi to automatically assign roles according to the table?
I have hundreds of users in the database and a few roles so it would really help if it was automated..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I haven't actually used this, but I think if you're using a direct query source, you are able to use the current user's access on the source for the access permission instead of the account that would normally be running the refresh. Unsure if this gets what you're after.
Otherwise if you're using import mode, you could probably do this with RLS - you'd still have to create the roles in the RLS settings, but you could use DAX to check the user roles and filter the data according to that for each. You'd have to recreate the logic of which role gets to see which data, but the DAX could take care of the security filtering assuming your source has a reference to the user's email address/UPN you can use for USERPRINCIPALNAME() in DAX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I haven't actually used this, but I think if you're using a direct query source, you are able to use the current user's access on the source for the access permission instead of the account that would normally be running the refresh. Unsure if this gets what you're after.
Otherwise if you're using import mode, you could probably do this with RLS - you'd still have to create the roles in the RLS settings, but you could use DAX to check the user roles and filter the data according to that for each. You'd have to recreate the logic of which role gets to see which data, but the DAX could take care of the security filtering assuming your source has a reference to the user's email address/UPN you can use for USERPRINCIPALNAME() in DAX.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
01-15-2025 06:50 PM | |||
10-24-2024 10:01 AM | |||
10-06-2024 03:37 AM | |||
11-12-2024 08:15 AM | |||
11-11-2024 12:42 AM |
User | Count |
---|---|
140 | |
110 | |
81 | |
61 | |
46 |