web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Country level filter f...
Power Apps
Answered

Country level filter from User profile

(2) ShareShare
ReportReport
Posted on by 119

Hi folks,

 

 

I want to filter the country dropdown in my PowerApps that fills in from the SharePoint master list.

 

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 specific Azure AD Group. Then, we want to filter the SharePoint list based on that current user country, and retrieve the appropriate country from the SharePoint master list, and display it in the filter dropdown.

 

 

Could someone please help us implement such a scenario in PowerApps ?

 

Thanks In advance!

Categories:
I have the same question (0)
  • Verified answer
    tsa-svd2srv Profile Picture
    204 on at
    I would avoid redundant API calls with a Global variable:
    Set(varIsGroupMember, "YourAzureADGroupID" in Office365Groups.CheckMemberGroups(User().Email, ["YourAzureADGroupID"]).value);
    Then in DropDown Items property:
    If(
        varIsGroupMember,
        'SharePointList'.CountryColumnName,
        Filter(
            'SharePointList',
            CountryColumnName = Office365Users.MyProfile().Country
        )
    )

    Replace "YourAzureADGroupID" with the actual group ID and CountryColumnName with the column name for countries in your SharePoint list.


    Then I would check these items:

    1.Integrate SharePoint Master List:

    •Ensure your SharePoint master list is added as a data source in PowerApps.

    2.Azure AD Group Check:

    •Add the Office365Groups connector to PowerApps.

    3.Retrieve User Profile Data:

    •Add the Office365Users connector to access the user’s profile.

    4.Test the Dropdown Logic:

    •Test both scenarios by switching users who belong to the Azure AD group and those who don’t.

    Let me know if it works.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard