Skip to content

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

To import your Microsoft Teams data into Zulip, you will need to take the following steps, which are described in more detail below:

  1. Export your Microsoft Teams data.
  2. Authorize a Microsoft Graph API token.
  3. Import your Microsoft Teams data into Zulip.
  4. Clean up after the Microsoft Teams export.
  5. 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”

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”
  1. 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.
  2. 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.
  3. Once your request is approved, go to the Microsoft Teams admin center as the global administrator.
  4. In the dashboard, find the user interface for the Teams data export.
  5. Select the date range, review the permissions prompt and start the export. Monitor its progress and download the zip file 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.

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:

  1. Log in to the Microsoft Entra ID portal as the global administrator.

  2. Navigate to the sidebar → Entra ID → App registrations, and click New registration.

  3. In the Register an application menu, enter the application’s name (e.g., “Zulip export”).

  4. In the Supported accounts types section, select Accounts in this organizational directory only.

  5. 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.

  6. In the app’s menu, navigate to the API permissions menu.

  7. Click Add a permission and select Microsoft Graph.

  8. Select Application permissions as the permission type.

  9. Search and add these permissions:

    • ChannelMessage.Read.All
    • User.Read.All
    • RoleManagement.Read.Directory

    See the required token permissions section for more details about these tokens and the endpoints that the import tool calls.

  10. Click the Grant admin consent for your organization button in the API permissions menu to grant admin consent to all scopes.

  11. Record the application’s redirect_uri, tenant_id and client_id. Under Certificates & secrets, create a client secret and record its value as client_secret. Use the secret value, not its ID.

  12. 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>
  13. 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_uri with the following parameters:

    Terminal window
    GET <redirect_uri>?tenant=<tenant_id>&admin_consent=True
  14. 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..."
    }
  15. Take note of the access_token.

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

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:

  1. The requested organization address. Confirm the domain, new organization creation, supported server version and required import scope with the operator.
  2. The exported data containing your workspace history, using the agreed transfer method. Confirm which private messages and personal data are included.

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.

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

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.

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.

Once the import process is completed, you will need to:

  1. 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.
  2. 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.
  3. Share the URL for your new Zulip organization, and (recommended) the Getting started with Zulip guide.
  4. 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.
  5. Migrate any integrations.

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)

  1. 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
  2. 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

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.

  1. Navigate to the Users tab of the Organization settings menu.
  2. Select the Imported tab.