cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

Is there any way to remove an owner from Teams using Power Automate? Or make an owner a member?

Hello. I am trying to remove a user from a Teams Team using Power Automate. I noticed there is no built-in action for this but heard that the group in Teams is the same as the AAD group so I am using the "Remove member from group" action.

 

picture1.png

 

The thing with this is it works for members but not owners. When I run this script on a certain member on a team they are removed from the team and can no longer see it. But with owners it's different. It removes them from the group but they are still in teams and can still access the team. 

Is there a way to get this to work with owners? and if not, is there a way to change an owner into a member using power automate?

I can confirm that they are removed from the group since when I run it again it says that user id doesn't exist anymore and can't be found.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Dual Super User
Dual Super User

@Mgodby 

 

Power Automate actions make Graph API calls. so, there is an alternate approach for your requirement.

 

In the Active Directory, create an app registration for MS Graph API v1.0 and provide all permissions mentioned in the following reference articles:

https://docs.microsoft.com/en-us/graph/api/resources/teams-api-overview?view=graph-rest-1.0

https://docs.microsoft.com/en-us/graph/api/group-delete-owners?view=graph-rest-1.0&tabs=http

 

Also, above articles talk about MS Graph API method for MS Team:

Remove-Owner

Check the link: https://docs.microsoft.com/en-us/graph/api/group-delete-owners?view=graph-rest-1.0&tabs=http

 

To use Graph API call, flow needs to use HTTP action with POST. 

 

HTTP is a premium connection.

 

Give a try and post here if you have any questions.

 

If this helps you, please mark it as Accepted Solution.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

1 REPLY 1
rsaikrishna
Dual Super User
Dual Super User

@Mgodby 

 

Power Automate actions make Graph API calls. so, there is an alternate approach for your requirement.

 

In the Active Directory, create an app registration for MS Graph API v1.0 and provide all permissions mentioned in the following reference articles:

https://docs.microsoft.com/en-us/graph/api/resources/teams-api-overview?view=graph-rest-1.0

https://docs.microsoft.com/en-us/graph/api/group-delete-owners?view=graph-rest-1.0&tabs=http

 

Also, above articles talk about MS Graph API method for MS Team:

Remove-Owner

Check the link: https://docs.microsoft.com/en-us/graph/api/group-delete-owners?view=graph-rest-1.0&tabs=http

 

To use Graph API call, flow needs to use HTTP action with POST. 

 

HTTP is a premium connection.

 

Give a try and post here if you have any questions.

 

If this helps you, please mark it as Accepted Solution.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,298)