# How to best import users from legacy application?

**URL:** <https://forum.keycloak.org/t/how-to-best-import-users-from-legacy-application/5446>\
**Category:** Getting advice\
**Created:** [October 17, 2020, 11:10am UTC](https://forum.keycloak.org/t/how-to-best-import-users-from-legacy-application/5446 "2020-10-17T11:10:56Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![schu](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/schu/32/1988_2.png) [@schu](https://forum.keycloak.org/u/schu)\
**Post date:** [February 23, 2022, 9:05am UTC](https://forum.keycloak.org/t/how-to-best-import-users-from-legacy-application/5446/7 "2022-02-23T09:05:20Z")

</div>

The JSON structure was something like this:

```auto
[
  {
    "realm": "myrealm",
    "users": [
      {
        "username": "username",
        "enabled": true,
        "totp": false,
        "emailVerified": true,
        "firstName": "firstName",
        "lastName": "lastName",
        "email": "email",
        "attributes": {
          "locale": [
            "de"
          ]
        },
        "credentials": [
          {
            "type": "password",
            "algorithm": "bcrypt",
            "hashedSaltedValue": "$2y$10$xxxxx"
          }
        ],
        "disableableCredentialTypes": [],
        "requiredActions": [
          "UPDATE_PASSWORD"
        ],
        "notBefore": 0,
        "groups": [
          "/Group"
        ]
      },
      {
        // ... more users
      }
    ]
  }
]

```

Note that the format could have changed since ('20) and that we use bcrypt.

A test export (Admin Dashboard: Manage → Export) should show the JSON structure.

Hope that helps!

---

_[View the full topic](https://forum.keycloak.org/t/how-to-best-import-users-from-legacy-application/5446)._
