Teams
The M365 Plugin Teams module is able to protect one or more teams of the Microsoft 365 Teams service. Public and private teams are supported, as well as public or private channels.
The information protected with this module is detailed below:
For groups:
Team metadata
Team settings metadata
Team members metadata
Team installed applications
Team channels (Public channels and private channels)
Channel metadata
Channel members for private channels
Channel tabs metadata
Channel messages - Chat messages - Hosted contents
The Teams module includes the following features:
Incremental/Differential backup
It is possible to exclude tabs or applications from the backup
It is possible to select what channels to include into the backup
It is possible to restore the data as a new Team in M365
Incremental backup of teams do not download Channel metadata of existing channels, installed apps or channel tabs. Those elements are only included in Full backups, as they do not present modification dates to handle.
The catalog stores the information with the following structure:
/@m365/tenantName/group/groupName/teams/
team/teamName
teamName.team
apps/
app1.teamapp
app2.teamapp
…
channels/
channel1Name/ (tabs/tab1.tab, tabs/tab2.tab)
2021-04-19 10.58.52..J-123.1.channel.msg
2021-04-19 09.58.52..J-123.2.channel.msg
2021-04-19 09.58.52..J-123.2.file.1.host.cnt
2021-04-19 09.58.52..J-123.2.file.2.host.cnt
channel2Name/
…
It is important to note how the information is distributed in M365, since many modules are related to each other. When talking about MS Teams this is very important to understand, as some information accessible from Teams is stored in other M365 locations that are already managed through other parts of the M365 Plugin.
For example, it is possible to include attachments (which is a different concept than hosted contents) in chat messages. These files are stored into the drive unit associated to the group associated to the team, so that information should be backed up simply including the drive module in the fileset.
Some of the most important relations to have in mind are:
A team is also directly attached to a group. So we need to use group parameters in the fileset in order to control ‘what team’ we want to backup.
A team can use a notebook from onenote: This is the group onenote
A team can store files: This is the onedrive unit for the group.
A team can have a calendar: This is the calendar of the group.
A team has a Team Site in Sharepoint: This can also be protected using the sharepoint module (and site parameters).
Backup parameters
The list below shows the specific backup parameters that can be set up in order to control the behavior of the teams module.
In order to select the teams module, the common service parameter must be equals or be containing the value teams.
Option |
Required |
Default |
Values |
Example |
Description |
---|---|---|---|---|---|
teams_channels |
No |
Valid names of existing channels from the selected teams to backup separated by’,’ |
General, Development |
Backup only selected channels of the included teams (from groups parameters) |
|
teams_channels_exclude |
No |
Valid names of existing channels from the selected teams to backup separated by’,’ |
Fun Channel |
Backup all channels of the included teams (from groups parameters) except the ones listed in this parameter |
|
teams_channels_regex_include |
No |
Valid regex |
*.corp |
Backup matching channels |
|
teams_channels_regex_exclude |
No |
Valid regex |
^Private.* |
Exclude matching channels |
|
teams_apps |
No |
Yes |
0, no, No, false, FALSE, false, off ; 1, yes, Yes, TRUE, true, on |
No |
Backup team apps from selected teams |
teams_channel_tabs |
No |
Yes |
0, no, No, false, FALSE, false, off ; 1, yes, Yes, TRUE, true, on |
No |
Backup team channel tabs from selected teams |
Restore parameters
The list below shows the subset of restore parameters that can be used to control the behavior of teams module restore operations:
send_report, debug -> Common restore parameters
team_name -> Control destination team: If a non existing one is provided, a new team will be created. If an existing team name is provided, it will be used to restore channels/apps/tabs inside. If this parameter is not set, original team name will be considered and the same logic will be applied.
team_channel_name -> Control destination channel name: If a non existing one is provided, a new channel will be created. If an existing channel name is provided, it will be used to restore messages inside. If this parameter is not set, original channel name will be considered and the same logic will be applied.
team_private_channels_mode -> Decide what to do about restoring private channels:
DELEGATED: Default value. Will ask for delegated permissions of the private channel owner
PUBLIC: Will convert private channels into public ones
SKIP: Won’t restore the private channel and will simply skip it
team_guest_members_enable -> Enable guest members (asking for interaction if needed)
Use cases
The following restore scenarios are supported:
Restore teams data into a newly generated Team: Set team_name with a new name.
Restore channels into an existing Team with their original name: Set team_name to the existing team.
Restore a channel with a new name into an existing Team: Set team_name to the existing team name and team_channel_name to a new name.
Restore messages into an existing Team/Channel: Set team_name and team_channel_name to both existing objects.
If you restore teams data into a new generated team, users and dates will be preserved as they originally were. However, if you restore data of a team inside an existing team, please be aware that messages won’t keep their original users or sent dates. This is only possible for new generated teams, existent ones do not allow to create such messages, so M365 Plugin adds a text prefix with that information, but all messages are actually sent with team owner user or channel owner (private channels case).
For private channels, if delegated mode is selected, they will be restored using the same strategy than messages into an existing team (previx with user and date). If they are converted to public, users and dates will be preserved, but the mode of the channel will be converted to public (this is due to Graph API limitations).
Please note that you can select particular channels or messages and restore them into the local filesystem (as json files) or into a new team/existing (it is not mandatory to select everything to have the restore working).
Microsoft Teams and Groups are associated entities. Therefore, the restore process will generate also a group with the same name of the Team.
If you want to restore also onedrive data, onenote data, etc, you could restore first teams data and then, restore any other data using as destination_group the name of the generated team (which is the same name the new generated group gets).
Fileset examples
Backup all teams from the tenant:
FileSet {
Name = fs-m365-all-teams
Include {
Options { signature = MD5 }
Plugin = "m365: service=teams tenant=57uia43-d107-17a2-a2g2-aa53c10tdahc objectid=56ddf1h9-eb5d-42nf-bac7-7b019fd284g5"
}
}
Backup specific team:
FileSet {
Name = fs-m365-site-notebooks-plan
Include {
Options { signature = MD5 }
Plugin = "m365: service=teams tenant=57uia43-d107-17a2-a2g2-aa53c10tdahc objectid=56ddf1h9-eb5d-42nf-bac7-7b019fd284g5 group=MyTeam"
}
}
Backup specific team including drive files and onenote:
FileSet {
Name = fs-m365-site-notebooks-plan
Include {
Options { signature = MD5 }
Plugin = "m365: service=teams,drive,onenote tenant=57uia43-d107-17a2-a2g2-aa53c10tdahc objectid=56ddf1h9-eb5d-42nf-bac7-7b019fd284g5 group=MyTeam"
}
}
Backup ‘General’ channel and do not backup tabs:
FileSet {
Name = fs-m365-peter-teams-noimages
Include {
Options { signature = MD5 }
Plugin = "m365: service=teams tenant=57uia43-d107-17a2-a2g2-aa53c10tdahc objectid=56ddf1h9-eb5d-42nf-bac7-7b019fd284g5 group=MyTeam teams_channels=General teams_channel_tabs=no"
}
}