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 / AzureAD.CheckMemberGro...
Power Apps
Unanswered

AzureAD.CheckMemberGroups expression not recognized in Power Apps

(0) ShareShare
ReportReport
Posted on by 188

Dear Community,

 

I am using the App.StartScreen to check current user's AD membership so I could decide whether to hide or show a button.

I am following the offical Microsoft Learn Link here doing exact same thing.

Basically, I need to have the following expression.

If(
 !IsEmpty(
 AzureAD.CheckMemberGroups(
 User().Email,
 ["Enter your Azure group ID here"]
 ).Value
 ),
 Set(varAdmin,true),
 Set(varAdmin,false)
)

Basically if I insert the same PowerFx expression now, it doesn't recognize the AzureAD function.

nhtkid_0-1700284816858.png

I have added the connector as well.

nhtkid_1-1700284909398.png

 

What am I missing?

Even thought Microsoft has rebranded AAD to Entra ID, it wouldn't deprecate the AzureAD function.

 

Thank you all.

 

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @nhtkid , Check group membership is DEPRECATED and instead use Check group membership (V2). PFB:

    ANB_0-1700315885227.png

    Also check https://learn.microsoft.com/en-us/connectors/azuread/

     

    Also, use this connector which is highlighted below:

    ANB_1-1700316027016.png

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • nhtkid Profile Picture
    188 on at

    Thanks for the reply @ANB.

    I have added the correct Entra ID connector, but looks like still the same error.

    nhtkid_0-1700361455831.png

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @nhtkid , Can you confirm on which version your app is correctly? 

    ANB_0-1700367849304.png

     

    Because, in my app when I add connector Microsoft Entra ID, it allow with this name in app MicrosoftEntraID.CheckMemberGroupsV2

     

    So, do not use AzureAD.CheckMemberGroupsV2, instead use MicrosoftEntraID.CheckMemberGroupsV2

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


     

  • nhtkid Profile Picture
    188 on at

    Hi @ANB,

    I just want to express my gratitude for your help.

    You are such a legend and we are so close the final resolution!

    I am on the same app version as yours.

    nhtkid_0-1700368762655.png

     

    After I updated to MicrosoftEntraID.CheckMemberGroupsV2, it is complaining something else. I am thinking maybe there is a slight change required for the formula?

    nhtkid_1-1700368932591.png

     

    But at least the function and action is correct now.

    Cheers,

     

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @nhtkid , So this is now all together different issue that you are facing now. The earlier issue was that due to naming changes, instead of using AzureAD, we need to use MicrosoftEntraID.

     

    Can you help me with the exact requirement so that I can help you accordingly build the logic.

     

    Thanks,

    ANB

  • Verified answer
    ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @nhtkid , If I understood correctly, then you want to check whether a logged in user belong to mention group or not. If yes, then you set a variable.

     

    So, use value not Value in code.

    If(
     !IsEmpty(
     MicrosoftEntraID.CheckMemberGroupsV2(
     User().Email,
     ["Enter your Azure group ID here"]
     ).value
     ),
     Set(
     varAdmin,
     true
     ),
     Set(
     varAdmin,
     false
     )
    )

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • nhtkid Profile Picture
    188 on at

    Hi @ANB,

     

    You are spot on. I am just checking whether the (Power Apps) logged in user belongs to a certain AAD group, whether it is a Security Group or an Office 365 group. The initial issue has gone, which was caused by me importing the wrong Microsoft Entra ID connector and also not using MicrosoftEntraID. operation. The new issue is that it does not like that operation.

     

    I am just following the guide here up to step No.18

    Integrate Power Apps in Teams with Azure Active Directory (contains video) - Power Apps | Microsoft Learn

     

    I just changed the lower case but seems like the new issue is still there.

    nhtkid_1-1700391426671.png

     

     

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    @nhtkid , The group ID should be in " "

     

    Thanks,

    ANB

  • Verified answer
    nhtkid Profile Picture
    188 on at

    This solution is correct. But there is a catch.

    You need to apply the code on the App's OnStart property.

    If you were like me having some weird UI issue and does not OnStart, you cannot have it on the StartScreen property. This was the mistake I made.

     

    If you did that, you will get an error suggesting "A behavioural action cannot be performed on a non-behavioural property". Checking AD membership is a behavioural action and "StartScreen" is a non-behavioural property.

    nhtkid_0-1701487846663.png

     

    Instead, you should go to the actual screen OnVisible property. In my case, the button I want to show/hide resides on the Welcome screen. So I pasted the code to the Welcome screen's OnVisible property to perform the check.

    nhtkid_1-1701488080572.png

    Then you can use the variable on the button's Visible property.

    https://youtu.be/Bu7nv_l1xzs

  • anabvaldez1 Profile Picture
    5 on at

    Hello, nhtkid,

     

    Please let me know if after putting " " in the object ID it worked. I am having the same issue and following the same video. 
    Also i saw you posted this syntax on the Onvisible property of the screen you wanted to hide the button on? Is this correct? ty.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard