<@U04UQ68083H> how to migrate users from one Ory p...
# ory-copilot
f
@chilly-king-10285 how to migrate users from one Ory project to another?
b
A message from kapa.ai
To migrate users from one Ory project to another, you can follow these steps: 1. Export users from the source project: Use the [Ory CLI](https://www.ory.sh/docs/guides/cli/cli-migration-v1#migrate-existing-scripts-and-automation) to list and export identities from your source project:
Copy code
ory list identities --project <source-project-id> --workspace <source-workspace-id>
2. Create a new project in the target workspace: Use the Ory CLI to create a new project in your target workspace:
Copy code
ory create project --name "Migration Target Project"    export ORY_PROJECT_ID='<new-project-id>'
[Create Ory Network projects](https://www.ory.sh/docs/migrate-to-ory#create-ory-network-projects) 3. Import users to the new project: Use the [create identity API](https://www.ory.sh/docs/reference/api#tag/identity/operation/createIdentity) to import your users into the new project. You can use the [batch create identities endpoint](https://www.ory.sh/docs/reference/api#tag/identity/operation/batchPatchIdentities) to import up to 2000 identities in a single request. [Import identities](https://www.ory.sh/docs/migrate-to-ory#import-identities) 4. Verify the migration: After importing the users, verify that they have been successfully migrated by listing the identities in the new project:
Copy code
ory list identities --project <new-project-id> --workspace <new-workspace-id>
[Import users to Ory](https://www.ory.sh/docs/migrate-to-ory/migrate-from-auth0#import-users-to-ory) It's important to note that this process will migrate the user identities, but not their active sessions. You may need to implement a transition period where both the old and new systems operate concurrently to ensure a smooth migration for users with active sessions. [Phased migration for active sessions](https://www.ory.sh/docs/migrate-to-ory#import-identities) Also, make sure to test this process in a development or staging environment before applying it to your production data. [Go live](https://www.ory.sh/docs/migrate-to-ory#go-live) If you encounter any issues or need more detailed assistance, you can join the [Ory Community Slack](https://slack.ory.sh/) for support or contact Ory for a [free consultation](https://ory.sh/contact).