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 Apps - Building Power Apps
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Error in using Office365Groups.ListGroupMembers()

Posted on by
Hello
 
The idea is to use the following code for two different M365 groups:
 
//Set the current login user
Set(
    varUserName,
    User().FullName
);
Set(
    varUserName2,
    Substitute(
        varUserName,
        " ",
        ", "
    )
);
Set(varGroupName, " ");
 
If(
    With(
        {
            ConsultingID: LookUp(
                Office365Groups.ListOwnedGroupsV3().value,
                id = "b8e84068-058b-4569-938d-ce95d73ab04a"
            ).id
        },
        Set(
            varRequester,
            varUserName2 in Office365Groups.ListGroupMembers(ConsultingID).value.displayName
        )
    ) = true,
    Set(
        varGroupName,
        "User is in Requester-Group"
    ),
    If(
        With(
            {
                NotOwnerID: LookUp(
                    Office365Groups.ListOwnedGroupsV3().value,
                    id = "02f11d57-6200-43eb-afd5-83487d685c32"
                ).id
            },
            Set(
                varApprover,
                varUserName2 in Office365Groups.ListGroupMembers(NotOwnerID).value.displayName
            )
        ) = true,
        Set(
            varGroupName,
            "User is in Approver-Group"
        )
    )
);
 
 
On the end I will always get the error, that the id is empty as well...
 
If somebody has an idea, please let me know and thanks in advance ;)
 
Regards
Michael

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard

Featured topics