emailVerified is typically a system-managed field, so it can't be manually updated via API. You should verify the email through Casdoor's verification process instead of trying to set this flag directly.
HI,
It looks like your update calls are succeeding, but the change isn't reflected because the emailVerified field might not be included in your payload or the API isn't handling partial updates correctly. Ensure you're explicitly setting emailVerified: true in your update request payload. Also, double-check that the user object you're updating contains the emailVerified attribute and that it's writable. If the SDK methods don't support partial updates, you might need to fetch the user first, modify the field, and then send the complete user object back for update. Lastly, verify if there's any caching layer or database delay that might delay the change reflection. If issues persist, review the API documentation or consider contacting Casdoor support for potential API limitations.
To ensure sync works, Casdoor must be configured to verify passwords using the same algorithm, iterations, and salt.
Ithink
Double-check that Casdoor's password verification method supports pbkdf2_sha256 with the same parameters.
If needed, you might need to customize Casdoor’s password verification to match Authentik's hashing scheme exactly.
Since the password starts with "pbkdf2_sha256$", it confirms that Authentik is using PBKDF2 with SHA-256.
oh, I see
at first, Make sure that Authentik's passwords are hashed with pbkdf2-salt and use the correct salt key.
and then, Check if Casdoor is set to verify passwords using the same pbkdf2-salt method with the AUTHENTIK_SECRET_KEY.
then, Ensure that the password stored in Authentik is hashed, not plain text.
Finally, Enable debug logs to see why the password check is failing.
Check if the import script is set to update users if they already exist, instead of adding them again.
Look at the logs to see where it stops.
The error indicates that you're attempting to insert a user with a UUID that already exists in the database.
To fix this, first verify if the UUIDs you're importing conflict with existing records by running a query to find duplicates.
If duplicates are found, consider performing an upsert operation that updates existing users instead of inserting new ones.
You can do this using PostgreSQL's ON CONFLICT clause in your insert statements.
Alternatively, if you want to replace all existing users, you can truncate the table with TRUNCATE TABLE authentik_core_user RESTART IDENTITY CASCADE, but be cautious as this deletes all current data.
Ensure your migration process explicitly sets UUIDs to match existing users when needed.
Lastly, clean your data to avoid duplicates before importing to prevent conflicts.
This approach will help you sync users without violating the primary key constraints.

