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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / AzureAD.CheckMemberGroups
Power Apps
Unanswered

AzureAD.CheckMemberGroups

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

If the user is a member of the specified group, can DisplayMode be DisplayMode.Edit?

How can I write the following function to work?

 

If(IsMatch(AzureAD.CheckMemberGroups(User().Email("GroupId"))),DisplayMode.Edit)

 

Thanks,

Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    I tried playing around with that AzureAD connector but I get a authentication error message indicating that the grant requires admin permission. Digging a little further in looks like the Connector needs the account to have the following administrator permissions:

    Group.ReadWrite.All

    User.ReadWrite.All

    Directory.ReadWrite.All

     

    If every user needs this level of access to use the connector in the app then that is a non-starter. Do you know from your testing if every user needs this elevated access or if it is just the account that set-ups up the connector for the first time?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    There is no problem with Azure AD connector.

    I added a dropdown control and wrote the following function in the Items. This way I can see group member users.

     

    AzureAD.GetGroupMembers("GroupId").value

     

    I repeat my question.

     

    If the user is a member of the specified group, can DisplayMode be DisplayMode.Edit?

    How can I write the following function to work?

     

    If(IsMatch(AzureAD.CheckMemberGroups(User().Email("GroupId"))),DisplayMode.Edit)

     

    Thanks,

  • BitLord69 Profile Picture
    914 on at

    Check this old post where I show an example how to check for group membership: https://powerusers.microsoft.com/t5/General-Discussion/Is-it-possible-to-switch-the-view-as-InfoPath-in-powerapps/m-p/54604#M22624

     

    Good luck!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    I have not found an example of the question I asked in the related post.

     

    I repeat my question.

     

    If the user is a member of the specified group, can DisplayMode be DisplayMode.Edit?

    How can I write the following function to work?

     

    If(IsMatch(AzureAD.CheckMemberGroups(User().Email("GroupId"))),DisplayMode.Edit)

     

    Thanks,

  • Tully Profile Picture
    18 on at

    Hi Jeff, did you ever figure out if these admin permissions are needed for all users or just the user that initially creates the connector?

     

    Thanks.

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    I don't know if it is a shared access like SQL or if everyone needs access like a SharePoint connector. I don't have access to to use the Azure AD connector and I haven't been able to get with someone on our security team that has access to test this out.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    you missed a comma, and the second argument needs to be a table. But to be honest I can't figure out how to use this in a IF sentence. In another forum they use this: If(IsEmpty(AzureAD.CheckMemberGroups(.....)), true, false) but it doesn't work for me.

     

      AzureAD.CheckMemberGroups(

        User().Email,

        ["group-id"]

      )

     

     

    BTW:

    A table with 1 column like this one is written as ["1st record","2nd record","3rd record"], but if you have more columns you need to use the Table() function. Thank you MS...

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard