# Mapping "external names" to usernames vs names when using SSO

**URL:** https://meta.discourse.org/t/mapping-external-names-to-usernames-vs-names-when-using-sso/47991
**Category:** Support
**Created:** [July 30, 2016, 4:45am UTC](https://meta.discourse.org/t/mapping-external-names-to-usernames-vs-names-when-using-sso/47991 "2016-07-30T04:45:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![swisspol](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/swisspol/32/115586_2.png) [@swisspol](https://meta.discourse.org/u/swisspol)
#### Post date: [July 30, 2016, 4:45am UTC](https://meta.discourse.org/t/mapping-external-names-to-usernames-vs-names-when-using-sso/47991/1 "2016-07-30T04:45:53Z")

</div>

Hi,

I’m right in the middle of setting up a trial Discourse instance and this includes configuring SSO with the user accounts on an external server. These user accounts must have an email / password, and they may have an optional name and avatar. That name is not guaranteed to be unique and can contain arbitrary UTF8 including whitespace.

Looking at the docs, I have no idea if this “external name” should be mapped to the Discourse “name” or “username”? I assume Discouse usernames have to be unique and can’t contain whitespace, so I may have to use “name”. But then what happens if the SSO’ed Discourse accounts have a name but no username?

Thanks for any help!

PS: I plan to enable all the “sso overrides” settings so that things remain in sync.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [July 30, 2016, 4:57am UTC](https://meta.discourse.org/t/mapping-external-names-to-usernames-vs-names-when-using-sso/47991/2 "2016-07-30T04:57:31Z")

</div>

Map your external names to sso name. It will generate unique username automatically

---

<div class="post-metadata">

### Author: ![swisspol](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/swisspol/32/115586_2.png) [@swisspol](https://meta.discourse.org/u/swisspol)
#### Post date: [July 30, 2016, 3:03pm UTC](https://meta.discourse.org/t/mapping-external-names-to-usernames-vs-names-when-using-sso/47991/3 "2016-07-30T15:03:59Z")

</div>

Thanks for the help.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 18, 2019, 6:11am UTC](https://meta.discourse.org/t/mapping-external-names-to-usernames-vs-names-when-using-sso/47991/4 "2019-02-18T06:11:07Z")

</div>



---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [February 18, 2019, 8:29am UTC](https://meta.discourse.org/t/mapping-external-names-to-usernames-vs-names-when-using-sso/47991/5 "2019-02-18T08:29:19Z")

</div>


