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 / Office365Groups.ListGr...
Power Apps
Unanswered

Office365Groups.ListGroupMembers failed: The Method 'ListGroupMembers' has an invalid value for parameter 'groupid'

(0) ShareShare
ReportReport
Posted on by 3,506

I have the following formula to check if the login user is inside a group named "SRM Dev Admin User" and redirect the user to a specific start page:-

 

sc.png

 

but the above formula is raising this error:-

 

Office365Groups.ListGroupMembers failed: The Method 'ListGroupMembers' has an invalid value for parameter 'groupid'

 

Any advice on this please?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @johnjohn123 ,

    I answered this earlier with a reference to my blog. Just get the Id of the group (as in first part of blog) and this works

    If(
     User().FullName in Office365Groups.ListGroupMembers(
     "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
     ).value.displayName,
     AdminHomePage,
     VendorScoreCard_1
    )

     

    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.

    Visit my blog Practical Power Apps

  • johnjohn123 Profile Picture
    3,506 on at

    @WarrenBelzi do not want to use the Group ID, i want to reference by name

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    @johnjohn123 ,

    I am struggling to understand why not when it is so simple, but expanding the logic (this structure is actually in my blog)

    With(
     {
     wGroupID: 
     LookUp(
     Office365Groups.ListOwnedGroups().value,
     displayName = "Your Group Name"
     ).id
     },
     If(
     User().FullName in Office365Groups.ListGroupMembers(wGroupID).value.displayName,
     AdminHomePage,
     VendorScoreCard_1
     )
    )

     

    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.

    Visit my blog Practical Power Apps

     

  • johnjohn123 Profile Picture
    3,506 on at

    @WarrenBelz  i can not use this formula inside the app startscreen property...

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    @johnjohn123 ,

    I tested it here and got no errors, so not sure of the issue, however if it does not work (or the ID does not as well), then you may have to re-think your structure. I use a master SharePoint list of our employees (we have about 150 in the division) and have all their details in there. A lookup on that would certainly work.

     

    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.

    Visit my blog Practical Power Apps

  • ErikM9 Profile Picture
    163 on at

    Hi @WarrenBelz,

    I get the Office 365Groups error however, it appears only during the app startup. 

    I've reviewed the backend of the app several times and there are no errors in the formulas?

    Even the App Checker is clean.

    IT is curious and is making the app look unprofessional 😞

     

    Erik

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @ErikM9 ,

    I have seen that before myself and avoid using the code at App OnStart.

  • ErikM9 Profile Picture
    163 on at

    Hi,

    In App OnStart, I 'm just setting variables. In particular, I'm setting 2 Group IDs for later use.

    regarding the screens that make use of Office365Groups.ListGroupMembers, there is no formula in the screen OnVisiable property. A list of group members is called for a  filtered Gallery.

     

    Maybe it relates to the Visibility property for one of the elements on the first screen that loads?

     

    Office365Users.MyProfileV2().mail in Office365Groups.ListGroupMembers(varAdminGroupID).value.mail

     

     

    When attempting the solution you provided, I find it curious that when I list the groups owned, the 2 Security groups I created and an part owner do not appear in the gallery (Office365Groups.ListOwnedGroups().value)?

    Though, check Azure, I am listed as Owner.

     

    Your review and feedback are appreciated.

    Erik

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    @ErikM9 ,

    Using User().FullName at the start works fine for me (I have it in a couple of prod apps). I assume that varAdminGroupID is the correct ID for that group.

  • ErikM9 Profile Picture
    163 on at

    Hi Warren,

    I appreciate your guidance.

    As I work through your blog posting, can you tell me is "wAdminAD" a variable? What do I set its value to?

    Maybe I'm not understanding the formula correctly either 🙂

     

    Erik

     

    {Update} First, I understand what wAdminID is 🙂

    The formula works now, but I needed to leave PowerApps studio online and reload the app for it to function.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard