web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics