# Create user with admin rest api, enable email login on. error: 401 not authorized

**URL:** <https://forum.keycloak.org/t/create-user-with-admin-rest-api-enable-email-login-on-error-401-not-authorized/12814>\
**Category:** Miscellanaeous\
**Created:** [December 29, 2021, 6:53am UTC](https://forum.keycloak.org/t/create-user-with-admin-rest-api-enable-email-login-on-error-401-not-authorized/12814 "2021-12-29T06:53:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TemoSulava](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/temosulava/32/4323_2.png) [@TemoSulava](https://forum.keycloak.org/u/TemoSulava)\
**Post date:** [December 29, 2021, 6:53am UTC](https://forum.keycloak.org/t/create-user-with-admin-rest-api-enable-email-login-on-error-401-not-authorized/12814/1 "2021-12-29T06:53:57Z")

</div>

I have changed the settings in the keycloak for the users to be able to use email as their log ins. But since then i can not make through the keycloak to return the response, it just throws the error 401 not authorized, i have researched, tried a lot of things and none of them worked. I have admin-cli client and another string300 client and i have service accounts turned on and if i change the grant type settings but then i get my client is not eligible for external service account usage. Nothing works for me
