KC-SERVICES0013: Failed authentication: org.keycloak.storage.ReadOnlyException:

Hi Team,

We have insalllted keycloak standalone version 21.1.0 on window server 2019, and configured user federation with Microsoft AD. we are trying to enable google authentication (CONFIGURE_TOTP) on keycloak but keycloak trying to write user attributes and action ON microsoft AD LDAP. Keycloak server providing below error.
KC-SERVICES0013: Failed authentication: org.keycloak.storage.ReadOnlyException: Not possible to write ‘required action CONFIGURE_TOTP’ when updating user ‘xxxxxx@xxxxxxx.com’. Along with we have added user attributes in microsoft AD LDAP and added new attributes not visiable on keycloak. so how can keycloak write issue will be solved.

I don’t know your AD User Federation configuration, but most probably, you have set the “Edit Mode” to READ_ONLY.
To be able to store data in Keycloak, like required actions and other user attributes, you should set it to UNSYNCED.