Skip to main content

Notifications

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard