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
Community Champion
Community Champion

@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
Community Champion
Community Champion

@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.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,786)