cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nicolescholes
Frequent Visitor

AzureAD.CheckMemberGroups

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,

7 REPLIES 7
Jeff_Thorpe
Super User
Super User

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?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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,

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...

 

Good luck!

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,

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.

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.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Anonymous
Not applicable

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...

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (60,161)