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 Pages / Office365Groups.ListGr...
Power Pages
Answered

Office365Groups.ListGroupMembers return only members

(0) ShareShare
ReportReport
Posted on by 84

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.

Categories:
I have the same question (0)
  • H V Profile Picture
    1,510 on at

    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!

  • firektl Profile Picture
    84 on at

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

  • v-yutliu-msft Profile Picture
    on at

    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,

  • firektl Profile Picture
    84 on at

    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.

  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    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,

     

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 Pages

#1
Fubar Profile Picture

Fubar 70 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard