cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Office365Groups.ListGroupMembers return only members

Greetings to the community, I am new in the development of Power Apps and my questions is the following:

 

I am using the AttendanceApp tyo take attendance, I would like to know if the in any way that the Office.365Group.ListGroupMembers function returns only our members, currently it also takes the owners.

 

The information that the function returns is stored in a SharePoint list, what I want is to be able to filter the information so that it does not insert the owners in the SharePoint list  

 

ForAll(
    Office365Groups.ListGroupMembers(ClassDropdown.Selected.id).value;
    Collect(
        AttendanceRecord;
        {
            Title: GUID();
            LessonId: attendance_list_guid;
            Attendance: "Not taken";
            ClassId: ClassDropdown.Selected.id;
            LessonDate: TakeAttendanceDatePicker.SelectedDate;
            StudentEmailId: Mail;
            AttendanceTakenBy: "";
            EndTime: Concatenate(
                EndHourDropdown.Selected.Value;
                ":";
                EndMinDropdown.Selected.Value
            );
            StartTime: Concatenate(
                StartHourDropdown.Selected.Value;
                ":";
                StartMinDropdown.Selected.Value
            );
            StudentName: DisplayName;
            ClassName:ClassDropdown.Selected.displayName
        }
    )
);;

 

Thank you very much who can help me.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Office365Groups.ListGroupMembers return only members

Hi @firektl ,

Ok, I understand your issue.

However, to make Office365Groups.ListGroupMembers return only members, I'm afraid the only solution is to remove the group owner from the group members manually in azure ad.

Do you have any other problem?

If not, could you mark my answer as solution?
Thanks!

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Impactful Individual
Impactful Individual

Re: Office365Groups.ListGroupMembers return only members

Hi @firektl

This is PowerApps Portals related forum.

You can post your question in below forum. https://powerusers.microsoft.com/t5/Building-Power-Apps/bd-p/PowerAppsForum1

 

--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

Highlighted
Frequent Visitor

Re: Office365Groups.ListGroupMembers return only members

Thank you @SylvieLet17  I will make the questions through that forum.

Highlighted
Community Support
Community Support

Re: Office365Groups.ListGroupMembers return only members

Hi @firektl ,

Do you want to use Office.365Group.ListGroupMembers function to list group members, not including group owner?

The key point is that:

list owned groups based on user id.

However, there's no action about this for Office.365Group connecter.

The supported actions are:

ACTIONS
Add member to group

This operation is used to add a member to an O365 group, using a UPN.

Create a group event (V2)

This operation is used to create a new event in a group calendar.

Create a group event [DEPRECATED]

This action has been deprecated. Please use Create a group event (V2) instead.

This operation is used to create a new event in a group calendar.

List group members

This operation returns a list of all members in the given group and their details such as name, title, email, etc.

List groups that I own and belong to

This operation returns a list of all groups that you own and belong to.

List my owned groups

This operation returns a list of all groups that you own.

List my owned groups (V2)

This operation returns a list of all groups that you own.

Remove member from group

This operation is used to remove a member from an O365 group, using a UPN.

 

So I'm afraid it's not supported to justify whether user is the group owner by using this connector.

 

What's more, I've made a similar test and found that:
if you do not add the group's owner as the group member, Office.365Group.ListGroupMembers function will not return the group owner.

This function will only list group members, not including group owner.

For example:

My group member:

993.PNG

 My group owner:

994.PNG

 

This function will not return "Phoebe Liu".

995.PNG

 

 

So in your issue, the most simple solution is:
delete the group owner in the group member in azure ad.

Then this function will not return group owner.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Office365Groups.ListGroupMembers return only members

Hi 

 

Thank you very much for your recommendations, I have applied them by making some adjustments and I achieved what I wanted.

 

In this case, I must remove the owners from the member list, but I wanted to tell you the following:

 

The groups are created through the Microsoft Teams platform and it is a function carried out by an academic coordination staff; which do not have access to the Azure Active Directory platform. So when creating the group from Microsoft Teams I place the owners as members, this happens with the 4 types of groups handled by Microsoft Teams (Class, PLC, Teachers, Others); there is a way to correct this.


Thank you.

Highlighted
Community Support
Community Support

Re: Office365Groups.ListGroupMembers return only members

Hi @firektl ,

Ok, I understand your issue.

However, to make Office365Groups.ListGroupMembers return only members, I'm afraid the only solution is to remove the group owner from the group members manually in azure ad.

Do you have any other problem?

If not, could you mark my answer as solution?
Thanks!

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (7,608)