cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

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

@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
Power Participant
Power Participant

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.

 

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (12,540)