**Source URL:** https://limited.veevavault.dev/qualityone/vault-api/api-reference/26.3/qualityone/migrate-team-members

# Migrate Team Members

Migrate multiple *Team* member assignments from one Vault to another. Vault assigns users to *Team* roles on records by creating team member records asynchronously on behalf of the user. This endpoint does not support deleting or updating existing *Team* assignments. Learn more about [working with Teams in Vault Help](https://qualityone.veevavault.help/en/lr/70759).

Your security profile and permission set must grant permission to manage the relevant *Team* member object.

*   The maximum CSV input file size is 50 MB.
*   The values in the input must be UTF-8 encoded.
*   CSVs must follow the standard RFC 4180 format, with some [exceptions](/qualityone/vault-api/references/csv-rfc-deviations).
*   The maximum batch size is 500.

This endpoint respects the following validations when creating *Team* assignments:

*   Maximum number of users allowed per role
*   The assigned application role must exist
*   The assigned user must be active
*   Duplicate assignments are skipped

This endpoint bypasses the following validations when creating *Team* assignments:

*   Constraining roles
*   Cascading rules
*   Team completeness (allows for partial team assignments)
*   Exclusive role membership
*   Linked role fields

The target Vault does not need to be in [configuration mode](https://qualityone.veevavault.help/en/lr/36928). While the migration executes, Vault prevents users from updating role assignments for all *Teams* included in the migration.

<Endpoint path="/api/{version}/qualityone/qms/teams/vobjects/{team_member_object_name}/actions/migration" method="POST" />

## Headers

| Name | Description |
| --- | --- |
| `Content-Type` | `text/csv` |
| `Accept` | `application/json` |

## URI Path Parameters

| Name | Description |
| --- | --- |
| `{object_name}` | The object `name__v` field value for the team member object. For example, `audit_team_member__v`, `lab_investigation_team_member__v`. |

## Body Parameters

| Name | Description |
| --- | --- |
| `file` | The filepath to the CSV file. |

#### Example CSV Input

Prepare a CSV input file with three columns for the team-enabled record, assigned user, and application role. The fields may differ from the example below; however, the chosen fields must be text fields (not ID), unique, and their value less than 1,500 characters. Assignments must be grouped by their team-enabled record. For example, all *Team* member assignments for record `AUD-000019` must be in the same batch.

| `quality_event__qdm.name__v` | `user__sys.global_id__sys` | `application_role__v.api_name__v` |
| --- | --- | --- |
| AUD-000019 | 179483\_1971057 | editor\_\_v |
| AUD-000019 | 179483\_4373488 | viewer\_\_v |
| AUD-000019 | 179483\_4331548 | approver\_\_c |

## Request

<CodeExample title="">
```bash
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: text/csv" \
-H "Accept: text/csv" \
-F 'file=@"Teams_Migration_AUD-000019.csv"' \
https://myvault.veevavault.com/api/v26.2/qualityone/qms/teams/vobjects/audit_team_member__v/actions/migration' \
```
</CodeExample>

## Response

<CodeExample title="">
```json
{
    "responseStatus": "SUCCESS",
    "jobId": 620001
}
```
</CodeExample>

## Response Details

On `SUCCESS`, the response returns the `jobId` for the action, and the authenticated user receives an email and Vault notification with a CSV file of the results of the operation. Partial success is allowed, meaning some *Team* assignments in the batch may succeed while others fail. For any failed assignments, the results CSV file includes a reason for the failure.

---

**Previous:** [Manage Team Assignments](/qualityone/vault-api/api-reference/26.3/qualityone/manage-team-assignments)  
**Next:** [QualityOne HACCP](/qualityone/vault-api/api-reference/26.3/qualityone-haccp)