cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KKBystry
Level: Powered On

Cloning MS team with owners

Hi,

 

I have built a flow connected to a powerapp that allows to create a new team based on a chosen template team. It works fine, however it does not copy all the owners from the original template team. My template team has 8 owners and the newly created one has only one. Is copying owners currently supported? If not, would you suggest a workaround I could use in my flow? In my call I'm using all the possible options: members, channels, tabs etc. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
JimmyWork
Level 8

Re: Cloning MS team with owners

@KKBystry So ive tested it and you are correct.

Only the creator of the Team is cloned as an owner, the rest of the owners becomes members in the new team.

 

If you check the clones team in the Teams admin portal i found that the members will say owners but does not yet have the owner permissions. I will let this sync over night and see if it changes.

 

If not this is a workaround i tested using flow and graph. But it basically adds a group of members and promotes them to owners.

In the flow after Team is created i use a HTTP get. (For each)
https://graph.microsoft.com/v1.0/groups/ID/members

 

List all members in a groups, parse json.

 

Then a new HTTP Post.

https://graph.microsoft.com/v1.0/groups/@{body('Get_cloned_Team_GUID')?['targetResourceId']}/owners/...

 

Body:

{
"@odata.id": "https://graph.microsoft.com/v1.0/users/@{body('Parse_Project_Leaders')?['id']}"
}

 

This will add all members of a specific group and promote them to owners.
I use a Azure Dynamic group for this in my flow.

 

View solution in original post

2 REPLIES 2
JimmyWork
Level 8

Re: Cloning MS team with owners

I will check this in my flow next week. I believe it should copy all owners.

If not you could add the Group of the template for example Template Group members to the newly created Team and promote to owners.

 

JimmyWork
Level 8

Re: Cloning MS team with owners

@KKBystry So ive tested it and you are correct.

Only the creator of the Team is cloned as an owner, the rest of the owners becomes members in the new team.

 

If you check the clones team in the Teams admin portal i found that the members will say owners but does not yet have the owner permissions. I will let this sync over night and see if it changes.

 

If not this is a workaround i tested using flow and graph. But it basically adds a group of members and promotes them to owners.

In the flow after Team is created i use a HTTP get. (For each)
https://graph.microsoft.com/v1.0/groups/ID/members

 

List all members in a groups, parse json.

 

Then a new HTTP Post.

https://graph.microsoft.com/v1.0/groups/@{body('Get_cloned_Team_GUID')?['targetResourceId']}/owners/...

 

Body:

{
"@odata.id": "https://graph.microsoft.com/v1.0/users/@{body('Parse_Project_Leaders')?['id']}"
}

 

This will add all members of a specific group and promote them to owners.
I use a Azure Dynamic group for this in my flow.

 

View solution in original post

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,798)