Check If A User Is Part Of An Office 365 Group In Power Apps

When developing the Power Apps canvas application, you may occasionally need to verify whether the user belongs to a specific Microsoft 365 group.

For example, suppose you want to enable or disable an action or Power Apps button based on the user’s group membership. In that case, we primarily need to check if the current user is part of an Office 365 group or not.

In this tutorial, I will cover how to check if a user is part of an Office 365 Group in Power Apps with a few examples. Additionally, we will check how to enable/disable the Power Apps button based on Office 365 Group membership.

Check If A User Is Part Of An Office 365 Group In Power Apps

In the Power Apps canvas app, we need to use a connector called Office365Groups, which helps us check if any other user or the currently logged-in user is a member of a specific Office 365 group. And the result always returns a boolean value, either true or false.

If the specific user exists in any particular Office 365 group, the function returns true; otherwise, it returns false.

So let’s get started.

Add Power Apps Office365Groups Connector

To add the Office 365 Groups connector in the app, go to the Data tab (from the left nav) -> + Add data -> Search Office 365 Groups -> Select Office 365 Groups -> Provide the credentials and add it.

Add Power Apps Office365Groups Connector

In this Office 365 Groups connector, we have various functions, including ListGroups, ListGroupMembers, ListOwnedGroups, and ListOwnedGroupsV2, among others.

Here, we will use two essential functions, ListGroups and ListGroupMembers, to determine whether the user belongs to a specific Office 365 group.

Display All Office 365 List Groups in Power Apps

If you want to display the entire list of groups that are present in Office 365, insert a Power Apps Data table and write the code below on its Items property as:

Office365Groups.ListGroups().value

ListGroups() = This function returns a list of all groups in the organization.

Power Apps Check If A User Is Part Of An Office 365 Group

If you want to filter a specific Office 365 group in the organization, we need to use a filter where the group display name equals ‘Hiring‘ <Your Group Name>, as shown below.

Office365Groups.ListGroups({'$filter': "displayName eq 'Hiring'"}).value

Refer to the image below.

PowerApps Check If A User Is Part Of An Office 365 Group

Display Users From Office 365/SharePoint Group in Power Apps

To display all users or members from any Office 365 group, we need to use the ListGroupMembers method. Here, we must pass the ID/GUID value of the specific Office 365 group.

Select the Data table control and apply the code below to its Items property:

Office365Groups.ListGroupMembers("07533a31-06d3-4f14-8843-baca3c8a4dd6").value

07533a31-06d3-4f14-8843-baca3c8a4dd6” = Provide the specific Office 365 Group ID

Display Users From Office 365 Group in Power Apps

Also, we can retrieve the members of an Office 365 group by the specific group name. For example, I want to see all the users who are present inside the Hiring group.

To achieve this, apply the code below:

With(
    {group: First(Office365Groups.ListGroups({'$filter': "displayName eq 'Hiring'"}).value)},
    Office365Groups.ListGroupMembers(group.id).value
)

Where,

Hiring‘ = Provide the Office 365 Group Display Name

Display Users From Office 365 Groups in PowerApps

Check If the Current Logged In User Is Part Of An Office 365 Group In Power Apps

Next, we will discuss how to check if the current user belongs to an Office 365 group using Power Apps. Let’s have a look at the examples below:

Example – 1: [Check Current Login User Is Part Of A Specific Group Using Variable]

We can use a Power Apps global variable to check if the current logged-in user belongs to a particular Office 365 group or not.

Go to the Power Apps App’s OnStart property and set the formula below:

Set(
    gblIsApprover,
    User().Email in Office365Groups.ListGroupMembers("7a16e9c2-d7c1-441c-a023-30d1329aa323").value.mail
);

Where,

  • gblIsApprover = Variable Name
  • 7a16e9c2-d7c1-441c-a023-30d1329aa323” = Specify the specific Office 365 group ID where you want to check whether the current user is present or not.

The above code always returns the boolean value true or false. If it returns true, then the current user is a member of the specific group; otherwise, it will return false.

Check If the Current Logged In User Is Part Of An Office 365 Group In Power Apps

To view the result, add a Label and set the variable on its Text property:

"IS A MEMBER: " & gblIsApprover

You can see that the result returns false as the current user is no longer a part of the specific group, as shown below.

Check If Current Logged In User Is Part Of An Office 365 Group In Power Apps

Example – 2: [Check Current Login User Is Part Of A Specific Group Using With() Function]

Additionally, we can use the Power Apps With() along with the Office365Groups.ListGroups() to check whether the current user belongs to a specific Office 365/SharePoint group or not.

Insert a Label and set its Text property as:

"IS A MEMBER: " & With(
    {group: First(Office365Groups.ListGroups({'$filter': "displayName eq 'Leave Management'"}).value)},
    User().Email in Office365Groups.ListGroupMembers(group.id).value.mail
)

Where,

  • Leave Management‘ = Provide the specific Office 365 Group Display Name
  • User().Email = It gives the current logged-in user’s email address
Check If Current Logged In User Is Part Of An Office 365 Group In PowerApps

If you want to check if any other user/member is a part of the Office 365 group, you can use his/her email ID instead of User().Email.

Refer to the code below for your reference:

"IS A MEMBER: " & With(
    {group: First(Office365Groups.ListGroups({'$filter': "displayName eq 'Leave Management'"}).value)},
    "PattiF@szg52.onmicrosoft.com" in Office365Groups.ListGroupMembers(group.id).value.mail
)

These are the two different methods to check if the current logged-in user belongs to an Office 365/SharePoint group in Power Apps.

Enable/Disable Power Apps Button Based On Office 365 Group Membership

I have a Power Apps Survey form including some fields and a button. I want to enable or disable the button based on the Office 365/SharePoint group membership.

Let’s say that if the current user belongs to the specific group, then only the SAVE button will be in edit mode; otherwise, it will be disabled.

To work around this, select the button and apply the formula below on its DisplayMode property:

If(
    With(
        {group: First(Office365Groups.ListGroups({'$filter': "displayName eq 'Tsinfo Tech Developer'"}).value)},
        User().Email in Office365Groups.ListGroupMembers(group.id).value.mail
    ),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

‘Tsinfo Tech Developer’ = Provide the Office 365 group display name

If you want to use a different email address, you can replace it with User().Email.

Enable Disable Power Apps Button Based On Office 365 Group Membership

This is the best approach to enable or disable the Power Apps button based on Office 365 group membership.

In this article, we learned all about the Power Apps Office365Groups connector, how to display all Office 365 list groups, and how to check if a user is part of an Office 365 Group in Power Apps with two different methods.

I hope you found this article very helpful!

Also, you may like some more Power Apps tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Live Webinar

Quiz App Using SharePoint Framework (SPFx)

Learn to built a complete Quiz Management solution that enables admins to create and manage quizzes, categories, questions, and settings with an easy automated setup process in SharePoint. It also includes an interactive quiz experience for users and a powerful dashboard to track participation, analyze results, and view detailed performance reports with charts and answer insights.

📅 2nd June 2026 – 10:00 AM EST | 7:30 PM IST

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App