cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SylvieLet17
Level 8

Gallery Office365Groups.ListGroupMembers not working with group ID

I want to display the members of a mail-enabled security group in a gallery.

 

In Flow if I use a "List group members" action with the ID of my my mail-enabled security group, the correct info is returned. 

However if I use that same ID in the function: 

 

Office365Groups.ListGroupMembers('mygroupID')

I get "Name isn't valid. The identifier isn't recognized"

 

I have added Office 365 connector to connections and to data sources

If I set the gallery to: 

Office365Groups.ListOwnedGroups().value

it shows me (some of) my Office 365 groups, but not mail-enabled security groups.

However, I have tried 

Office365Groups.ListGroupMembers('mygroupID')

using an Office 365 Group - but same error. 

And when I try the below same issue, even when I use the group ID of one of the groups that shows up in the "ListOwnedGroups" function above.

Filter(Office365Groups.ListOwnedGroups().value, id='MyGroupdID')

I am getting the group ID from Azure Active Directory. 

Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Gallery Office365Groups.ListGroupMembers not working with group ID

Yes, it does work for me with my Office 365 groups.  I created a label and set its text property to

First(Office365Groups.ListOwnedGroups().value).id

That gives me the Id of the first O365 group in my tenant.

Then I set the Items property of the gallery to

Office365Groups.ListGroupMembers(LabelName.Text).value

Then added a textbox to the gallery template and set its Item property to

ThisItem.DisplayName

The key is making sure you get the right Id for the group.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: Gallery Office365Groups.ListGroupMembers not working with group ID

The problem is with your premise.  A mail enabled security groups is NOT an Office 365 group, so there is no way to get the members of that kind of group using the Office365Groups connector.  I think your process is OK, but you need to use the Azure 

AD connector instead of the Office365Groups connector.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
SylvieLet17
Level 8

Re: Gallery Office365Groups.ListGroupMembers not working with group ID

@Pstork1 

But I've also tried the ListGroupMembers formula with an Office 365 group as well.

It didn't work either. 

Are you able to use it on an O365 Group?

 

Thanks,

Sylvie 

Dual Super User
Dual Super User

Re: Gallery Office365Groups.ListGroupMembers not working with group ID

Yes, it does work for me with my Office 365 groups.  I created a label and set its text property to

First(Office365Groups.ListOwnedGroups().value).id

That gives me the Id of the first O365 group in my tenant.

Then I set the Items property of the gallery to

Office365Groups.ListGroupMembers(LabelName.Text).value

Then added a textbox to the gallery template and set its Item property to

ThisItem.DisplayName

The key is making sure you get the right Id for the group.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

SylvieLet17
Level 8

Re: Gallery Office365Groups.ListGroupMembers not working with group ID

YES @Pstork1  YOU BEAUTIFUL GENIUS!!

Not only is this working perfectly - it is actually working for MAIL ENABLED SECUIRTY GROUPS!!

It was just my syntax. I needed the .value (of course)

 

So I set my label to the sec group ID (which I got from Azure AD)

Then did as you said for the gallery and now I'm set. I have what I want.

Thank you!!!

Dual Super User
Dual Super User

Re: Gallery Office365Groups.ListGroupMembers not working with group ID

You should be able to actually use the formula from the Text property of the label directly in the other formula.  I just created a label to make sure I was getting what I thought I was.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,177)