Maintain control of your Microsoft 365 data
Post Reply
Bjoern_ch
Service Provider
Posts: 45
Liked: 16 times
Joined: Sep 09, 2022 12:22 pm
Full Name: Bjoern
Location: Zurich
Contact:

Support for archived Teams

Post by Bjoern_ch »

Hi veeam,

if you backup an archived team vbo does not preserve the "Make the SharePoint site read-only for team members" property. This means that the "archive" is editable again by members, which is actually pretty bad for an archive. In the end the teams archiving feature is not usable if vbo "unarchives" it.
We have several customers, universities, which do not want that a student can edit a team after it was archived.
Most teams in these environment could be archived (they usually only need the team for a semester), if this would work with vbo. And because an archived team does not change it would be really great if there is an option to exclude archived teams from the backup. This way i could reduce the teams to backup by 80-90% which would be very helpful. MS would like that probably too because it reduces the (totally unnecessary) load on their side.
Or is there a way to exclude archived teams from the backup?

Regards,
Bjoern
Polina
Veeam Software
Posts: 2981
Liked: 708 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Support for archived Teams

Post by Polina »

Hi Bjoern,

The read-only state of a team site is not indicated in team's properties, and that is why VB365 cannot preserve it. There's no way to identify if this setting is applied to an archived team or not.
And out of the box, VB365 doesn't provide any filtering to exclude teams by certain parameters/properties. It might be possible with PowerShell though, I'll try to check it.

Thanks!
Bjoern_ch
Service Provider
Posts: 45
Liked: 16 times
Joined: Sep 09, 2022 12:22 pm
Full Name: Bjoern
Location: Zurich
Contact:

Re: Support for archived Teams

Post by Bjoern_ch »

Hi Polina,
thanks for your reply.
If there is an option to do this with powershell that would be good.

Best regards,
Bjoern
Polina
Veeam Software
Posts: 2981
Liked: 708 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Support for archived Teams

Post by Polina » 1 person likes this post

Hi Bjoern,

All credit to our QA engineers who assisted with the below script:

Code: Select all

#Install Microsoft Teams PowerShell module
Install-Module -Name MicrosoftTeams -Force -AllowClobber

#Connect to your M365 tenant and get all archived teams
Connect-MicrosoftTeams 
$ClT = Get-Team -Archived $True 

#Add the selected archived teams to VB365 job exclusions
$Org = Get-VBOOrganization -Name "nameorganization.onmicrosoft.com"
$Job = Get-VBOJob -Name "teams"
$VBT = @()
foreach ($Team in $ClT)
{
    $OrgT = Get-VBOOrganizationTeam -Organization $Org -DisplayName $Team.DisplayName
    $VBT += New-VBOBackupItem -Team $OrgT
}
Add-VBOExcludedBackupItem -Job $Job -BackupItem $VBT
Bjoern_ch
Service Provider
Posts: 45
Liked: 16 times
Joined: Sep 09, 2022 12:22 pm
Full Name: Bjoern
Location: Zurich
Contact:

Re: Support for archived Teams

Post by Bjoern_ch » 1 person likes this post

Hi Polina,

thx, that`s awesome. I really appreciate your effort. Also many thanks to the QA engineers!
This will probably solve many problems. At least I`m hoping so. We have large throttling issues at the moment with one customer and miss RPO (24h), but now we can reduce the total number of objects in their jobs by a significant amount.
I keep you posted with the results but probably my customers need some time to plan the archiving now. They will also be happy that they can archive the teams now and nobody can edit them anymore.
So, it is always worth a try to check your problems/limitations also in the forums, not only with the veeam support team (Case #05824830). ;-)
Again, many thanks!

Best regards,
Bjoern

PS: Sorry for my late reply, I probably need to adjust my notification settings....
Polina
Veeam Software
Posts: 2981
Liked: 708 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Support for archived Teams

Post by Polina »

No worries at all )
Keep me posted on the results.
Bjoern_ch
Service Provider
Posts: 45
Liked: 16 times
Joined: Sep 09, 2022 12:22 pm
Full Name: Bjoern
Location: Zurich
Contact:

Re: Support for archived Teams

Post by Bjoern_ch »

Finally, we tested the script.
If Teams Chat is enabled you have to add -TeamsChat to New-VBOBackupItem
For connect we use the azure application.
I disabled the job (or disable automatic schedule), added a line to start the job from the script and created a scheduled task. Voilà, dynamically excluding archived Teams before each job run is working. :-) It works perfectly if an orga is already in the backup when archiving teams starts. If you have already archived teams when you start doing a backup then you must decide to exclude the archived teams from the beginning or loose the "not editable" attribute for those teams.

Script works fine, but one thing I do not understand: each archived team is excluded 3 times.
Output of $CLT is:
PS C:\windows\system32> $ClT

GroupId DisplayName Visibility Archived MailNickName Description
------- ----------- ---------- -------- ------------ -----------
262c2629-15c3-4042-8dc8-36c963d5b325 Test Private True Test Test

while output of Get-VBOExcludedBackupItem -Job $Job is:

PS C:\windows\system32> Get-VBOExcludedBackupItem -Job $Job

Team Chats Type
---- ----- ----
Test True Team
Test True Team
test True Team

Why is that?

Here my script version:

Code: Select all

# Variables for app-only authentication, orga, job
$TenantID = "your TenantID"
$ApplicationID = "your AppID"
$Thumbprint = "Certificate Thumbprint5"
$OrganizationName = "your orga name"
$JobName = "your Jobname"

#Install Microsoft Teams PowerShell module
#Install-Module -Name MicrosoftTeams -Force -AllowClobber

#Connect to your M365 tenant and get all archived teams
Connect-MicrosoftTeams -TenantId $TenantID -ApplicationId $ApplicationID  -CertificateThumbprint $Thumbprint
$ClT = Get-Team -Archived $True

#Add the selected archived teams to VB365 job exclusions
$Org = Get-VBOOrganization -Name $OrganizationName
$Job = Get-VBOJob -Name $JobName
$VBT = @()
foreach ($Team in $ClT)
{
    $OrgT = Get-VBOOrganizationTeam -Organization $Org -DisplayName $Team.DisplayName
    $VBT += New-VBOBackupItem -Team $OrgT -TeamsChats
}
Add-VBOExcludedBackupItem -Job $Job -BackupItem $VBT

# Start Backupjob
Get-VBOJob -Name $JobName | Start-VBOJob
Post Reply

Who is online

Users browsing this forum: MaartenA and 14 guests