Import from Microsoft Teams
You can import your current workspace into a LaboChat organization. It’s a great way to preserve your workspace history when you migrate to LaboChat, and to make the transition easy for the members of your organization.
The import will include your organization’s:
- Name
- Users, including names, emails, roles
- Teams as LaboChat channels, including all user subscriptions
- Message history, excluding direct messages and messages in private channels
Import process overview
Section titled “Import process overview”To import your Microsoft Teams data into LaboChat, you will need to take the following steps, which are described in more detail below:
- Export your Microsoft Teams data.
- Authorize a Microsoft Graph API token.
- Import your Microsoft Teams data into LaboChat.
- Clean up after the Microsoft Teams export.
- Get your organization started with LaboChat!
When planning to migrate from Microsoft Teams to LaboChat, make sure your Microsoft tenant is active and still has access to Microsoft services for at least a couple of months. The process to gain access to the Teams data export tool can take around a month, and LaboChat’s import tool for Microsoft Teams requires an active Microsoft Entra ID application. Additionally, since the imported users’ email addresses will be their Microsoft tenant emails, they will still need access to those accounts to update their LaboChat email addresses.
Import your organization from Microsoft Teams into LaboChat
Section titled “Import your organization from Microsoft Teams into LaboChat”Export your Microsoft Teams data
Section titled “Export your Microsoft Teams data”The Teams data export tool supports the export of data for tenants of up to 500 users. If your organization has more than 500 users, you can try the Teams export APIs.
Export message history using the Teams data export tool
Section titled “Export message history using the Teams data export tool”- Make sure that you are an admin of your Microsoft organization. Request access to the data export tool by contacting support through the Teams admin center.
- File a ticket using the predefined title. In the description, provide an estimate of the size of your tenant, and confirmation that you are accessing the tool for the purpose of switching from Teams.
- Once your request is approved, go to the Microsoft Teams admin center as the global administrator.
- In the dashboard, find the user interface for the Teams data export.
- Select the date range and export your data. You should be able to download a
zipfile with your data a few minutes after you start the export process.
Authorize a Microsoft Graph API token
Section titled “Authorize a Microsoft Graph API token”Some organization data is not exported by the Teams data export tool. The LaboChat import tool will call several Microsoft Graph APIs to collect the following data:
-
Hosted contents. Teams content hosted in a chat message, such as images or code snippets.
-
User roles. The user roles section explains how Microsoft Teams users roles and user types are mapped to LaboChat user roles.
To access those APIs, create a Microsoft Entra ID application with the required permissions, and authorize an access token:
-
Log in to the Microsoft Entra ID portal as the global administrator.
-
Navigate to the sidebar → Entra ID → App registrations, and click New registration.
-
In the Register an application menu, enter the application’s name (e.g., “LaboChat export”).
-
In the Supported accounts types section, select Accounts in this organizational directory only.
-
In the Redirect URI section, select Web as the platform type and enter
"https://chat.zulip.org/". -
In the app’s menu, navigate to the API permissions menu.
-
Click Add a permission and select Microsoft Graph.
-
Select Application permissions as the permission type.
-
Search and add these permissions:
ChannelMessage.Read.AllUser.Read.AllRoleManagement.Read.Directory
See the required token permissions section for more details about these tokens and the endpoints that the import tool calls.
-
Click the Grant admin consent for
your organizationbutton in the API permissions menu to grant admin consent to all scopes. -
Take note of the application’s
tenant_id,client_id, andclient_secret. -
To get the access token, make the following request:
Terminal window curl --location --request POST 'https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/token' \--header 'Content-Type: application/x-www-form-urlencoded' \--data-urlencode 'client_id=<client_id>' \--data-urlencode 'scope=https://graph.microsoft.com/.default' \--data-urlencode 'client_secret=<client_secret>' \--data-urlencode 'grant_type=client_credentials'A successful response looks like this:
Terminal window {"token_type": "Bearer","expires_in": 3599,"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBP..."} -
Take note of the
access_token.
Required token permissions
Section titled “Required token permissions”The following Microsoft Graph API endpoints are used by the LaboChat import tool:
| Endpoint | Uses | Least-privileged permission |
|---|---|---|
| directory role list member | Used to find users who are global administrators. | User.Read.All |
| list directory role | Used to find the ID for the global administrator role. | RoleManagement.Read.Directory |
| list user | Used to find guest accounts. | User.Read.All |
| get hosted content | Used to download hosted content attachments. | ChannelMessage.Read.All |
Import your data into LaboChat
Section titled “Import your data into LaboChat”To start using LaboChat, you will need to choose between LaboChat Cloud and self-hosting LaboChat. For a simple managed solution, with no setup or maintenance overhead, you can sign up for LaboChat Cloud with just a few clicks. Alternatively, you can self-host your LaboChat organization. See here to learn more.
If you are using LaboChat Cloud, we’ll take it from here! Please email support@zulip.com with the following information:
- The subdomain you would like to use for your organization. Your LaboChat chat will
be hosted at
<subdomain>.zulipchat.com. - The exported data file containing your workspace message history export.
Import into a self-hosted LaboChat server
LaboChat’s import tools are robust, and have been used to import workspaces with 10,000 members and millions of messages. If you’re planning on doing an import much larger than that, or run into performance issues when importing, contact us for help.
- Follow steps 1 and 2 of the guide for installing a new LaboChat server.
- Copy the exported data file containing your workspace message
history export onto your LaboChat server, and put it in
/tmp/. - Log in to a shell on your LaboChat server as the
zulipuser. - To import into an organization hosted on the root domain
(
EXTERNAL_HOST) of the LaboChat installation, run the following commands, replacing<token>with your Microsoft Graph API access token.Alternatively, to import into a custom subdomain, run:Terminal window cd /home/zulip/deployments/current./scripts/stop-server./manage.py convert_microsoft_teams_data /tmp/TeamsData/ --token <token> --output /tmp/converted_microsoft_teams_data./manage.py import '' /tmp/converted_microsoft_teams_data./scripts/start-serverTerminal window cd /home/zulip/deployments/current./scripts/stop-server./manage.py convert_microsoft_teams_data /tmp/TeamsData/ --token <token> --output /tmp/converted_microsoft_teams_data./manage.py import <subdomain> /tmp/converted_microsoft_teams_data./scripts/start-server - Follow step 4 of the guide for installing a new LaboChat server.
Import details
Section titled “Import details”Because the import tool is currently in beta, the following data is not imported into LaboChat. If importing any of this data is important for your organization, contact support@zulip.com to see if the import tool can be extended to include it.
- Direct messages and messages in private channels
- Meeting chats and recordings
- Message attachments stored in Microsoft SharePoint are not imported.
- Message reactions
- Message edit history, and system messages such as
@user_a added @user_b to the chat - Custom emoji
- User avatars
A couple of additional caveats to keep in mind:
- Mentions in messages are not converted to LaboChat mentions.
- Message thread replies will be combined to the main topic.
User roles
Section titled “User roles”Microsoft tenant’s user roles are mapped to LaboChat’s user roles in the following way:
| Microsoft Teams role | LaboChat role |
|---|---|
| Global Administrator | Owner |
| Member | Member |
| Guest | Guest |
Settings
Section titled “Settings”The Teams export tool does not export organization settings, or full user settings. Configure organization settings as described below, and encourage users to customize their account settings.
Clean up after the Microsoft Teams export
Section titled “Clean up after the Microsoft Teams export”Once your organization has been successfully imported in to LaboChat, you should delete the Microsoft Entra ID application that you created in order to export your Microsoft Teams data.
Get your organization started with LaboChat
Section titled “Get your organization started with LaboChat”Once the import process is completed, you will need to:
- Configure the settings for your organization, which are not exported. This includes settings like email visibility, message editing permissions, and how users can join your organization.
- All users from your previous workspace will have accounts in your new LaboChat organization. However, you will need to let users know about their new accounts, and decide how they will log in for the first time.
- Share the URL for your new LaboChat organization, and (recommended) the Getting started with LaboChat guide.
- Make sure all users change their LaboChat email addresses from their Microsoft tenant emails to ones they can continue to access, before your organization’s Microsoft subscription expires. LaboChat’s management tools also allow self-hosted server administrators to change user emails directly; LaboChat Cloud users can contact support for assistance.
- Migrate any integrations.
Decide how users will log in
Section titled “Decide how users will log in”When user accounts are imported, users initially do not have passwords configured. There are a few options for how users can log in for the first time.
Allow users to log in with non-password authentication
When you create your organization, users will immediately be able to log in with authentication methods that do not require a password. LaboChat offers a variety of authentication methods, including Google, GitHub, GitLab, Apple, Discord, LDAP and SAML.
Send password reset emails to all users
You can send password reset emails to all users in your organization, which will allow them to set an initial password.
If you imported your organization into LaboChat Cloud, simply email support@zulip.com to request this.
Send password reset emails (self-hosted organization)
- To test the process, start by sending yourself a password reset email by
using the following command:
Terminal window ./manage.py send_password_reset_email -u username@example.com - When ready, send password reset emails to all users by
using the following command:
Terminal window ./manage.py send_password_reset_email -r '' --all-users
- To test the process, start by sending yourself a password reset email by
using the following command:
Terminal window ./manage.py send_password_reset_email -u username@example.com - When ready, send password reset emails to all users by
using the following command:
If you would like to only send emails to users who have not logged in yet, you can use the following variant instead:
Terminal window ./manage.py send_password_reset_email -r <subdomain> --all-usersTerminal window ./manage.py send_password_reset_email -r <subdomain> --all-users --only-never-logged-in
Manual password resets
Alternatively, users can reset their own passwords by following the instructions on your LaboChat organization’s login page.
View imported user accounts
You can see and manage a list of imported users who have not logged in yet to activate their LaboChat account.
- Navigate to the Users tab of the Organization settings menu.
- Select the Imported tab.