# Email instead of username in authentication header

**URL:** <https://community.cumulocity.com/t/email-instead-of-username-in-authentication-header/4684>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [April 14, 2021, 3:54pm UTC](https://community.cumulocity.com/t/email-instead-of-username-in-authentication-header/4684 "2021-04-14T15:54:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milos.ilic](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@milos.ilic](https://community.cumulocity.com/u/milos.ilic)\
**Post date:** [April 14, 2021, 3:54pm UTC](https://community.cumulocity.com/t/email-instead-of-username-in-authentication-header/4684/1 "2021-04-14T15:54:53Z")

</div>

Hello,

Is it possible to use email address of user account instead of username when authenticating against Cumulocity REST API ?

Also, we are developing mobile app which will read the data on Cumulocity REST API backend, so we are wondering if it is possible to let user create their Cumulocity account using google single sign on for registration? We would like to import email, name, user photo…

Thanks in advance,  
Miloš

---

<div class="post-metadata">

**Author:** ![Stefan\_Veit3](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_veit3/32/15532_2.png) [@Stefan\_Veit3](https://community.cumulocity.com/u/Stefan_Veit3)\
**Post date:** [April 16, 2021, 7:42am UTC](https://community.cumulocity.com/t/email-instead-of-username-in-authentication-header/4684/2 "2021-04-16T07:42:37Z")

</div>

Hi Miloš,

no, it is not possible to use the email address instead of the username. A best practice is to set the username like the email address on account creation.

Please also consider to switch from authentication via BasicAuth to OAuth.

Regards,  
Stefan

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [July 15, 2021, 7:43am UTC](https://community.cumulocity.com/t/email-instead-of-username-in-authentication-header/4684/3 "2021-07-15T07:43:20Z")

</div>

Closed on July 15, 2021, 7:43am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
