Import from Microsoft Teams
You can import your current workspace into a Zulip organization. It’s a great way to preserve your workspace history when you migrate to Zulip, 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 Zulip 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 Zulip, 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 Zulip.
- Clean up after the Microsoft Teams export.
- Get your organization started with Zulip!
Keep your Microsoft tenant and the import application’s access active throughout export, trial import and final migration. Export access requires approval; confirm the schedule with Microsoft before cancelling services. Imported users also need continued access to their tenant email accounts to update their Zulip email addresses.
Import your organization from Microsoft Teams into Zulip
Section titled “Import your organization from Microsoft Teams into Zulip”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 you have the required administrator access. Request access to the data export tool through the Microsoft request form described in its export documentation.
- Select API technical documentation or information, then Technical documentation or information, and Data Export Tool (500 users or less). Provide contact information, the approximate tenant size and confirmation that the export is for 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, review the permissions prompt and start the export.
Monitor its progress and download the
zipfile when ready. Access to the tool lasts up to 90 days; the download is available for 24 hours after preparation. New messages created during export are not included: agree on the final export window before switching users.
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 Zulip 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 Zulip 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., “Zulip export”).
-
In the Supported accounts types section, select Accounts in this organizational directory only.
-
If you use the administrator-consent redirect flow below, select Web under Redirect URI and register an address controlled by your administrator. Record it as
<redirect_uri>. The client-credentials token request itself does not use a redirect URI. -
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. -
Record the application’s
redirect_uri,tenant_idandclient_id. Under Certificates & secrets, create a client secret and record its value asclient_secret. Use the secret value, not its ID. -
To gain administrator permission, make the following HTTP request using the details from your Microsoft Entra ID application:
Terminal window https://login.microsoftonline.com/<tenant_id>/adminconsent?client_id=<client_id>&redirect_uri=<redirect_uri> -
You will be redirected to the Microsoft sign in page. Log in using a global administrator account and approve all the application permissions that you have requested. If successful, you will be redirected to your application’s
redirect_uriwith the following parameters:Terminal window GET <redirect_uri>?tenant=<tenant_id>&admin_consent=True -
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 Zulip 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 Zulip
Section titled “Import your data into Zulip”Choose how the destination server will be hosted with your operator or administrator before transferring the export. Confirm its version, supported import format, organization address and access permissions.
Contact your operator to agree on the destination and a protected transfer method. Provide:
- The requested organization address. Confirm the domain, new organization creation, supported server version and required import scope with the operator.
- The exported data containing your workspace history, using the agreed transfer method. Confirm which private messages and personal data are included.
Import into a self-hosted Zulip server
Agree on the supported import format, server version, disk and memory requirements with your administrator. Run a trial import and check its results before the final migration. For large exports or performance issues, contact support.
- Follow steps 1 and 2 of the guide for installing a new Zulip server.
- Copy the exported data file containing your workspace message
history export onto your Zulip server, and put it in
/tmp/. - Log in to a shell on your Zulip server as the
zulipuser. - To import into an organization hosted on the root domain
(
EXTERNAL_HOST) of the Zulip 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 Zulip server.
Import details
Section titled “Import details”Because the import tool is currently in beta, the following data is not imported into Zulip. If importing any of this data is important for your organization, contact your operator to discuss whether 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 Zulip 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 Zulip’s user roles in the following way:
| Microsoft Teams role | Zulip 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 Zulip, you should delete the Microsoft Entra ID application that you created in order to export your Microsoft Teams data.
Get your organization started with Zulip
Section titled “Get your organization started with Zulip”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 Zulip 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 Zulip organization, and (recommended) the Getting started with Zulip guide.
- Make sure all users change their Zulip email addresses from their Microsoft tenant emails to ones they can continue to access, before your organization’s Microsoft subscription expires. Zulip’s management tools also allow self-hosted server administrators to change user emails directly; Users on operator-managed servers 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
After the administrator enables and configures the required identity providers, users can log in with authentication methods that do not require a password. Supported providers depend on your server configuration and can include 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 your operator manages the destination server, contact support to arrange initial password reset emails. Confirm email delivery and account matching with a test user before the organization-wide send.
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 Zulip 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 Zulip account.
- Navigate to the Users tab of the Organization settings menu.
- Select the Imported tab.