Skip to main content

Notifications

Power Automate - Using Connectors
Answered

API to convert a Team from public to private

(0) ShareShare
ReportReport
Posted on by 102

Hi!

I have 2 questions I thought I must find an answer here

 

1. I am building a Teams provisioning App

 Teams privacy- (Public or Private)

  Teams lifecycle- (365 days or 180 days)

 

I have done a lot of research and testing to  use M Graph with update Team function so I can update the visibility to "private" from the properties of the Team but it does not seem to work. Used get and pach function cant make it work

Get-https://graph.microsoft.com/v1.0/teams/@{TeamId}

Patch-https://graph.microsoft.com/v1.0/teams/@{TeamId}

{
"id": "TeamId",
"visibility": "private",
}

 

2. Is there any way to automate the lifecycle of the (Group so when is chosen 180 days it changes the group in Azure?

 

https://graph.microsoft.com/v1.0/groupLifecyclePolicies

{
"groupLifetimeInDays": 180,
"managedGroupTypes": "@{outputs('GroupID')}",
"alternateNotificationEmails": "xxxxxxxx"
}

 

Is it true that there are limitation in creating lifecycle policies?

 

 

  • Verified answer
    titawitch Profile Picture
    titawitch 102 on at
    Re: API to convert a Team from public to private

    I found out the group privacy...I used   https://graph.microsoft.com/v1.0/groups{GroupId} instead of the https://graph.microsoft.com/v1.0/teams/@{TeamId} and it worked.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics