Get Owners of a Teams Channel Using Power Automate Flow
With Power Automate it has become easier to post automated messages, and alert approvals in Microsoft Teams, in the following blog we will explore some Power Automate actions which will help us to send these alerts messages and approvals to Microsoft Teams Channel Owners only.
So let’s begin…!
Let’s say we have a Teams Channel with members, as shown in the snapshot below. We need to send approvals to the Owner of the channel only.
Here is how it is done,
Step 1:
In power automate flow, search for Office 365 Group Action, and now select List all members action. Select the Teams name from the dropdown.
(Comments: When a Team is created it forms an Office 365 group)
Step 2:
Here we will be using the Microsoft Graph API to get the owners of the group more about it in the doc – https://learn.microsoft.com/en-us/graph/api/group-list-owners?view=graph-rest-1.0&tabs=http
API : GET /groups/{id}/owners
To get the ID go to https://admin.microsoft.com/ and follow the snapshot below.
(Comments: to get the id of the group you need to have admin privileges)
Step 3:
After we run the flow, we get the output for step 2 as shown in the snapshot below.
So now we need to get the “mail” from the “value” from step 2, hence here we use a Select action in Power Automate to get the emails from the values from step 2.
Step 4:
At last, we use a join expression to club the mails separated by (;)so that we can use them in the outlook action.
Power Automate Flow Screenshots:
Output:
Hope this helps 😉