# Custom UserStorage Provider: read only error while setting attribute

**URL:** <https://forum.keycloak.org/t/custom-userstorage-provider-read-only-error-while-setting-attribute/13122>\
**Category:** Getting advice\
**Created:** [January 18, 2022, 11:45am UTC](https://forum.keycloak.org/t/custom-userstorage-provider-read-only-error-while-setting-attribute/13122 "2022-01-18T11:45:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahim86](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@rahim86](https://forum.keycloak.org/u/rahim86)\
**Post date:** [January 18, 2022, 11:45am UTC](https://forum.keycloak.org/t/custom-userstorage-provider-read-only-error-while-setting-attribute/13122/1 "2022-01-18T11:45:06Z")

</div>

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.
