Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
sachinsoni441
New Member

Implement Custom Authorization In Power BI

Hello folks,

 

I want to filter the country dropdown in my Power BI report that fills in from the SharePoint master list when the Power BI report loads.

 

Scenario 1: Verify whether a user is a member of a particular Azure ad group. If so, we would like to display all SharePoint list countries in the filter dropdown.


Scenario 2: We want to determine the current user's country from their user profile if they are not a member of a particular Azure AD Group. Then, we want to filter the SharePoint list based on that current user country, retrieve the appropriate country from the SharePoint master list, and display it in the filter dropdown.

 

Note: We embedded the Power BI dashboard in the Canvas PowerApps tile.

 

Could someone please help us implement such a scenario in Power BI?

 

Thanks In Advacne!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @sachinsoni441 
Thanks for reaching out to the Microsoft fabric community forum.

Regarding the issue you raised, my solution is as follows:

1.Firstly, you can obtain the group member information you need using the Azure portal or PowerShell scripts and import it as a CSV file into Power BI.

Azure Portal:

vlinyulumsft_0-1737529308865.png

vlinyulumsft_1-1737529308866.png

Navigate to the Azure portal and access the relevant group to export the member information.

For further details, please refer to:

Bulk download group membership list - Azure portal - Microsoft Entra ID | Microsoft Learn

 

PowerShell Script:

Use a PowerShell script to retrieve the group member information. Here is an example script:

# Connect to Azure AD
Connect-MsolService

# Get group members
Get-MsolGroupMember -GroupObjectID "xxxxx" | export-csv "d:\GroupMemberList.csv"

 

2.Secondly, you can use the USERNAME() or USERPRINCIPALNAME() DAX functions to get the current logged-in user's information and filter the data using Row-Level Security (RLS) or data masking.Here are screenshots from the relevant documentation for USERNAME() and USERPRINCIPALNAME():

vlinyulumsft_2-1737529406888.png

For further details, please refer to:

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#using-the-usernam...

Here is the link to the data masking documentation:

Power BI & DAX: Data Masking vs. Row Level Security (RLS) – business intelligist
 

3.Lastly, here are some related links that might be helpful to you:

Power BI - RLS - Microsoft Fabric Community
 

Of course, if you have any new discoveries or questions, please feel free to get in touch with us.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi, @sachinsoni441 
Thanks for reaching out to the Microsoft fabric community forum.

Regarding the issue you raised, my solution is as follows:

1.Firstly, you can obtain the group member information you need using the Azure portal or PowerShell scripts and import it as a CSV file into Power BI.

Azure Portal:

vlinyulumsft_0-1737529308865.png

vlinyulumsft_1-1737529308866.png

Navigate to the Azure portal and access the relevant group to export the member information.

For further details, please refer to:

Bulk download group membership list - Azure portal - Microsoft Entra ID | Microsoft Learn

 

PowerShell Script:

Use a PowerShell script to retrieve the group member information. Here is an example script:

# Connect to Azure AD
Connect-MsolService

# Get group members
Get-MsolGroupMember -GroupObjectID "xxxxx" | export-csv "d:\GroupMemberList.csv"

 

2.Secondly, you can use the USERNAME() or USERPRINCIPALNAME() DAX functions to get the current logged-in user's information and filter the data using Row-Level Security (RLS) or data masking.Here are screenshots from the relevant documentation for USERNAME() and USERPRINCIPALNAME():

vlinyulumsft_2-1737529406888.png

For further details, please refer to:

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#using-the-usernam...

Here is the link to the data masking documentation:

Power BI & DAX: Data Masking vs. Row Level Security (RLS) – business intelligist
 

3.Lastly, here are some related links that might be helpful to you:

Power BI - RLS - Microsoft Fabric Community
 

Of course, if you have any new discoveries or questions, please feel free to get in touch with us.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.