Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
How can we create/update a security role mapping using the PowerBI REST API?
No sorry, we still didn't find a way to get or update security roles using REST APIs.
Hi @velotixym ,
Please refer this
Most of the times people will use security groups with Sailpoint iiq groups or queues to manage user access.It is the most recommended method as per my knowledge for managing the user access.If you have a smaller user based then you can try something with rest api's.
I hope it will be helpful.
Thanks,
Sai Teja
I hope
There is no way to use the REST API only?
Hi @velotixym ,
Regarding our discussion, I wonder if this issue has been resolved by now? It's been a long time since I've heard back from you and I'm not sure if all is well. Please feel free to let me know if there is anything else I can do to help.
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @velotixym ,
A REST API is a programming interface that requires a programming language (PowerShell, Python, C#) to send HTTP requests and process responses. Here's why you can't use the REST API directly:
HTTP Requests:
REST API communicates via HTTP requests and requires a programming language to build and send these requests.
Authentication:
Accessing a REST API requires authentication (usually OAuth 2.0), which requires a programming language to handle token acquisition and management.
Data Handling:
API responses are usually in JSON format, requiring a programming language to parse and process the data.
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
I would also like to know how to do this. From what I've read, creating roles with the API nor is assigning the roles DAX expressions. Has anyone found otherwise?
Hi @velotixym ,
If you want to implement RLS for defining security role mappings using a REST API, you can try the following steps.
1.Create roles in Power BI Desktop
2.Define roles and DAX filters in Power BI Desktop
3.Publish reports to Power BI services.
4.Use the Power BI REST API to assign users or security groups to the created roles.
There is a case that you could refer, Solved: Can I update Row-level security via Rest API? - Microsoft Power BI Community
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Can I do it without the PowerBI Desktop?
Which Power BI REST API can be used to assign users or security groups to the created roles?
Hi @velotixym ,
I think you can be out of desktop and still do these operations.
You can also try some other programming tool implementations, such as the power shell.
You can use the following script to add roles to the workspace.
{
"identifier": "user@domain.com",
"groupUserAccessRight": "Member",
"principalType": "User"
}
Here is a document I found for you that should help.
Groups - Add Group User - REST API (Power BI Power BI REST APIs) | Microsoft Learn
If further granularity is desired for the datasets in your workspace, you can also use the following script.
{
"identifier": "user@domain.com",
"role": "RoleName",
"principalType": "User"
}
You can also modify the script to suit the programming tool you are using.
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @velotixym ,
You can refer the below thread -
https://community.fabric.microsoft.com/t5/Service/Dynamic-RLS-using-Rest-API/m-p/2483473
I hope it will be helpful.
Thanks,
Sai Teja
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
19 | |
16 | |
15 | |
12 | |
11 |
User | Count |
---|---|
33 | |
26 | |
25 | |
19 | |
19 |