Chat
The M365 Plugin Chat module is able to protect any chat where a given user is participating.
- Please, note that this module needs Delegated permissions to work, so you will need to login using the Device Auth Flow
in order to have enough permissions to get the data: Delegated permissions.
The information protected with this module is detailed below:
For Users:
Chat metadata
Chat tabs metadata
Chat installed apps metadata
- Chat messages
Hosted contents
Chat module includes the following features:
Incremental/Differential backup
It is possible to exclude tabs or applications from the backup
The catalog stores the information with the following structure:
/@m365/tenantName/user/userName/chats/
chat1/ - chatName.chat
- apps/
app1.chatapp
app2.chatapp
…
- tabs/
tab1.chat.tab
tab2.chat.tab
…
2021-04-19 10.58.52..J-123.1.chat.msg
2021-04-19 09.58.52..J-123.2.chat.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
…
chat2/ - …
Backup parameters
The list below shows the specific backup parameters that can be set up in order to control the behavior of the chat module.
In order to select the chat module, the common service parameter must be or contain the value chat.
Option |
Required |
Default |
Values |
Example |
Description |
---|---|---|---|---|---|
chat_topics |
No |
Valid topics associated to existing chats from the selected user(s) to backup separated by’,’ |
ProjectA, Important |
Backup only selected chats of the included users |
|
chat_topics_exclude |
No |
Valid topics associated to existing chats from the selected user(s) to backup separated by’,’ |
Fun Channel |
Backup all chats of the included users except the ones listed in this parameter |
|
chat_topics_regex_include |
No |
Valid regex |
*.corp |
Backup matching chats (by topic) |
|
chat_topics_regex_exclude |
No |
Valid regex |
^Private.* |
Exclude matching chats (by topic) |
|
chat_apps |
No |
Yes |
0, no, No, false, FALSE, false, off ; 1, yes, Yes, TRUE, true, on |
No |
Backup chat apps from selected user chats |
chat_tabs |
No |
Yes |
0, no, No, false, FALSE, false, off ; 1, yes, Yes, TRUE, true, on |
No |
Backup team chat tabs from selected user chats |
chat_exclude_empty |
No |
No |
0, no, No, false, FALSE, false, off ; 1, yes, Yes, TRUE, true, on |
Yes |
Exclude any chat that has no messages inside |
chat_exclude_type_group |
No |
No |
0, no, No, false, FALSE, false, off ; 1, yes, Yes, TRUE, true, on |
Yes |
Exclude chats of type ‘group’ |
chat_exclude_type_one_on_one |
No |
No |
0, no, No, false, FALSE, false, off ; 1, yes, Yes, TRUE, true, on |
Yes |
Exclude chats of type ‘one_on_one’ |
Restore parameters
The list below shows the subset of restore parameters that can be used to control the behavior of teams module restore operations:
destination_user -> User that will be used to restore chats to it. Usually, it should be the same owner user of the messages to restore
send_report, debug -> Common restore parameters
chat_topic -> Control destination chat (add a new one)
Use cases
Depending on the chat type, it is possible to:
Group chats:
Restore chats as new ones, specifying a new topic with the restore variable ‘chat_topic’ (group chats)
Restore chat messages inside original chats (if they where deleted)
One on one chats:
One on one chats can have only one instance per pair of users. Therefore, the restore can only create chat messages with the implied user in case they were deleted before
As with any other plugin, local filesystem restore is possible too and we would get all objects (chat, chatMessages…) as json files, except hosted contents that will be restored as the original files.
Please note that restore to M365 service function is not able to restore messages in the exact form that they were generated because of Microsoft security policy around this service. It is not possible to create a chat message with a different date or user than the real ones that are being used for the current connection. Therefore when the restore is performed what Bacula M365 Plugin does is to add a little header for each message containing that information, but the messages will be all generated using the ‘destination_user’ or the original user in case that variable was not used. Example:
Fileset examples
Backup all chats of a user:
FileSet {
Name = fs-m365-peter-chat
Include {
Options { signature = MD5 }
Plugin = "m365: service=chat tenant=57uia43-d107-17a2-a2g2-aa53c10tdahc objectid=56ddf1h9-eb5d-42nf-bac7-7b019fd284g5 user=\"peter@mycompany.com\" "
}
}
Backup chats of all users, but do not backup tabs or installed apps:
FileSet {
Name = fs-m365-peter-chat-noimages
Include {
Options { signature = MD5 }
Plugin = "m365: service=chat tenant=57uia43-d107-17a2-a2g2-aa53c10tdahc objectid=56ddf1h9-eb5d-42nf-bac7-7b019fd284g5 chat_apps=no chat_tabs=no"
}
}