cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to use Azure Ad CheckMemberGroupsV2

Hallo, 

 

I have a canvas application that uses the Azure Ad connector. 

I use the CheckMemberGroups to check if a person is a member of a group with the following statement: 

!IsEmpty((AzureAD.CheckMemberGroups(User().Email; ["group-id"]).Value)) 

 

This function is deprecated and so I want to use the CheckMemberGroupsV2 version. But the V2 function dosn't work like the V1 version. Even if the documentary is the same (https://docs.microsoft.com/en-us/connectors/azuread/#getmembergroups_response_v2)

I am not able to use the ".Value".

When I use the statement:

!IsEmpty((AzureAD.CheckMemberGroupsV2(User().Email; ["group-id"]))) 

the statement always evaluate to true. 

So my question is: How to use the CheckMemberGroupsV2 method to find out, if a person is a member of a group? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: How to use Azure Ad CheckMemberGroupsV2

Hi @Anonymous ,

 

So I tested the CheckMemberGroupsV2 method in my environment, and I was able to correctly identify the groups where the user belonged to. You should do something like this:

 

!IsEmpty(AzureAD.CheckMemberGroupsV2(User().Email,["24e48800-d0f1-46e6-b9e8-54d838d5a457"]).value)

 

 

The difference in this method is that you should put the Value at the end of the formula, so that way it will let you know if the user indeed exists or not.

 

An example that I used was the one in the picture bellow, where upon clicking the button, the label would be updated with the result:

 

image.png

 

Hope this helps you move forward! Let me know if this reply helped. 🙂

 

 

Regards,

Ricardo

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: How to use Azure Ad CheckMemberGroupsV2

Hi @Anonymous ,

 

So I tested the CheckMemberGroupsV2 method in my environment, and I was able to correctly identify the groups where the user belonged to. You should do something like this:

 

!IsEmpty(AzureAD.CheckMemberGroupsV2(User().Email,["24e48800-d0f1-46e6-b9e8-54d838d5a457"]).value)

 

 

The difference in this method is that you should put the Value at the end of the formula, so that way it will let you know if the user indeed exists or not.

 

An example that I used was the one in the picture bellow, where upon clicking the button, the label would be updated with the result:

 

image.png

 

Hope this helps you move forward! Let me know if this reply helped. 🙂

 

 

Regards,

Ricardo

View solution in original post

Highlighted
Anonymous
Not applicable

Re: How to use Azure Ad CheckMemberGroupsV2

Hello @rimatos

 

thank you for your answer. Your reply helped me.

The error occurend because the first version of this method uses ".Value" and the V2 uses".value".

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,623)