Hi Everyone,
This post is a little old, but it helped me through my issue. There is one change I would make to using:
Office365Groups.ListGroupMembers("group object id").value
I had an issue when I inputted the ID of the Team. The 'groupID' never changed in the URL no matter which Team I selected. So I got members from a Team I didn't want.
To fix this (and more inline with displaying Users within a specific SharePoint), you can actually pull the members of a permission group on a specific Teams permissions group (owners, members).
If you go to the SharePoint of the Team, Settings(Gear), Site Permissions, Advanced Permissions Settings. Click the group you would like to grab the ID of. The ID you're looking for is:
Account c:0o.c|*******|99999999-0000-aaaa-bbbbccccdddd
If you use this ID in the 'ListGroupMembers' above, you will get a better list members.