Custom UserStorage Provider: read only error while setting attribute

Hi,

I’m using Keycloak to access API for authentication by implementing UserStorageProvider. I need advice to set the custom attribute from API response to Keycloak. When I set in attribute in isValid() method, Its throwing ReadOnlyException.