How to best import users from legacy application?

The JSON structure was something like this:

[
  {
    "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!