Moving from Amazon Cognito
List Cognito users and groups, convert them for Keycloak, and re-create app clients and identity providers. Password users set a new password by email link.
Passwords do not move. Cognito does not export passwords or hashes. Password users set a new password by email link after the move.
1. Export users and groups
Cognito has an import job but no export job, so list users with the AWS CLI. It follows the pagination for you:
aws cognito-idp list-users --user-pool-id <pool-id> --output json > users.jsonFor groups, run aws cognito-idp admin-list-groups-for-user per user (or list-users-in-group per group). To bring groups along, build a CSV with Cognito's attribute names as the header and a groups column.
2. Convert
Open the Cognito to Keycloak users converter. It reads the list-users JSON or the CSV, including Cognito's \, for a comma inside a value. It writes:
email,emailVerified, names,enabledandcreatedTimestampcustom:<name>as the<name>attribute, standard attributes such asphone_numberunder their own names, andsubascognito_sub- groups from the column you name
UPDATE_PASSWORDfor every user except federated ones (usernames such asGoogle_…, statusEXTERNAL_PROVIDER)
Keycloak gives each user a new id. If your backend keys data on sub, map cognito_sub into tokens or look users up by it.
3. Re-create the rest
| In Cognito | In Keycloak |
|---|---|
| App client | Client with the same callback URLs and scopes |
| Hosted UI | Keycloak's sign-in pages, in its own theme |
| Resource servers and custom scopes | Client scopes |
| Social and SAML identity providers | Identity providers; register the new redirect URI |
| Lambda triggers | Mappers, required actions or application code |
| MFA (TOTP, SMS) | Users enroll again; Keycloak has no built-in SMS codes |
4. Dry run, then cut over
Import into a staging realm with partial import and sign in through each app. At cut-over, stop sign-ups in Cognito, export again, import, switch the apps and send the set-password emails in batches. Keep the user pool unchanged until you sign the move off.
The Cognito migration page covers what each plan includes.
Moving from Okta
Export Okta users and groups through the API, convert them for Keycloak, and re-create app integrations. Password users set a new password by email link.
Moving from Azure AD B2C
List users from Azure AD B2C or Entra External ID with Microsoft Graph, convert them for Keycloak, and re-create apps and user flows. Local accounts set a new password by email link.