> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Assign Enterprise Email Accounts

> Customize email naming and duplicate resolution rules, assign DingTalk Enterprise Mail accounts to all members or specific members and departments at once, and review the results in Tasks.

Customize email naming rules and assign email accounts to multiple members at once.

## Procedure

**1. Open Bulk Account Assignment**

Sign in to the DingTalk admin console with an admin account or a sub-admin account that has the required permissions. Go to **App Management > Mail > Email Tools > Bulk Account Assignment**.

**2. Set the email naming rules**

![Email naming rules in Bulk Account Assignment](https://img.alicdn.com/imgextra/i2/O1CN019k9PwnCdvBB3rIng_!!6000000001370-2-tps-1901-763.png)

> [tab] Naming Rules
>
> Under **Prefix Format**, select one or more of the three available options: **Initials**, **Full Name**, and **User ID (last 4 digits)**. You can use one option or combine multiple options.
>
> Under **Email Address**, if your organization has multiple domains, select the domain you want to use.
>
> Preview: `lihua@example.com`
>
> ![Prefix Format and Email Address settings](https://img.alicdn.com/imgextra/i2/O1CN01RBQ3iXkUIFJ2dORX_!!6000000000065-2-tps-1298-129.png)

> [tab] Duplicate Resolution
>
> Enable **Duplicate Resolution** to apply a fallback rule when an email account with the same address already exists.
>
> For example, assume that the member Li Hua (李华) already has the DingTalk Enterprise Mail account `lihua@example.com`. If another member, Li Hua (李花), cannot be assigned an account because the address generated using the "Full Name\@Domain" rule already exists, the system generates an address using the fallback rule. If the fallback address is also a duplicate, an error is returned. In this case, go to **Directory** and assign the email account manually.
>
> Preview: `lh.lihua.1688@example.com`
>
> ![Duplicate Resolution fallback rule](https://img.alicdn.com/imgextra/i2/O1CN01HW7NfQCJMeK2ctF7_!!6000000005042-2-tps-1294-199.png)

**3. Set the account assignment rules**

Under **Assign to**, select **All** or **Specific Members / Departments**. The naming rules configured above apply to members within the selected scope.

> [tab] All
>
> If some members already have DingTalk Enterprise Mail accounts, they are identified in the result file after the task is complete. You can use **Add Exception** to exclude specific members or departments.
>
> ![Assign to All with exceptions](https://img.alicdn.com/imgextra/i2/O1CN010dw6fIsut7F2fPKP_!!6000000002699-2-tps-1314-171.png)

> [tab] Specific Members / Departments
>
> Select the members or departments to include, then add any members or departments to exclude.
>
> ![Assign to specific members or departments](https://img.alicdn.com/imgextra/i1/O1CN01XB0KhgA7qJB2eeVw_!!6000000001869-2-tps-1308-224.png)
>
> > [!NOTE]
> >
> > If you select a member who already has a DingTalk Enterprise Mail account, the selection fails and a message is displayed.

Click **Assign Account**, then wait for the task to finish.

**4. View the results**

Use **Tasks** to view account creation results and logs. After running the assignment, click **Tasks** in the upper-right corner.

Find the task with the corresponding operation time, then download the result file. Open the bulk account assignment result file and review any failure messages.

![Download the result file from Tasks](https://img.alicdn.com/imgextra/i4/O1CN01wnF1ReYUl5D5kFVO_!!6000000000534-2-tps-2830-1544.png)

## About the Results

> [accordion] What is shown if the new address matches the assigned address?
>
> If the new address is exactly the same as the address already assigned to the member, the result is shown as **Success**, not **Already assigned**.

> [accordion] What if another Enterprise Mail account is already linked?
>
> If the result indicates that another DingTalk Enterprise Mail account is already linked, an email account has already been assigned to that employee. Go to **Directory > Members** and view the **Enterprise Email** field for the employee.
>
> ![View the Enterprise Email field in Directory > Members](https://img.alicdn.com/imgextra/i3/O1CN01WZFc9VordmK4IkHo_!!6000000007129-2-tps-2119-1057.png)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.