I have a sharepoint site that was automatically generated when a Team was created in MS Teams. I am an owner of the Team and therefore also of the sharepoint site. In the sharepoint site I made a list in which all Team members can add new rows. In Power Automate I made a flow that interacts with this list. In this flow I want to check if the person who runs the flow is an owner of the Teams site.
I found the following REST call to do this:
_api/web/sitegroups/getByName('<group name>')/Users?$filter=Email eq '<user email>'
Where I of course substitute <user email> with my email address and <group name> with the owner group name (a Sharepoint Group).
Unfortunately the output is empty, while I really should be a member of the group because I am listed as owner in Teams! Now, apparently there is a difference between Sharepoint Groups and Office 365 Groups (created with Teams). So my question would be: is there a non-premium way within Power Automate to check whether a user is part of an Office 365 Group? Because checking if the user is part of a Sharepoint Group does not work.
Have you checked out the O365 Groups connector? https://docs.microsoft.com/en-us/Connectors/office365groups/#actions
You can use the "List group members" action to list out all of the users in a Group, or you can user "List Groups that I own and belong to" to reverse the lookup. Neither of these do exactly what you've described, but you should be able to make it work.
Please let me know if this helps,