# How do I access SSO external\_id in widget?

**URL:** https://meta.discourse.org/t/how-do-i-access-sso-external-id-in-widget/63378
**Category:** Development
**Created:** [May 25, 2017, 5:28pm UTC](https://meta.discourse.org/t/how-do-i-access-sso-external-id-in-widget/63378 "2017-05-25T17:28:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rohmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rohmann/32/120852_2.png) [@rohmann](https://meta.discourse.org/u/rohmann)
#### Post date: [May 25, 2017, 5:28pm UTC](https://meta.discourse.org/t/how-do-i-access-sso-external-id-in-widget/63378/1 "2017-05-25T17:28:55Z")

</div>

I need to know my user’s ID from the our external user database to connect an integration. Some context:  
**HBS**

```plaintext
{{mount-widget widget="my-custom-widget" args=(hash user=user)}}

```

**Widget**

```plaintext
export default createWidget('topic-widget', {
  html(attrs, state) {
     console.log( attrs.user )
  }
});

```

I have the user, but it looks like there’s no way to get the external ID from that object? How can I supplement this? Is there a way to have that property available on the model? Thanks!

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [May 25, 2017, 6:44pm UTC](https://meta.discourse.org/t/how-do-i-access-sso-external-id-in-widget/63378/2 "2017-05-25T18:44:06Z")

</div>

Are you storing the external id in a custom field on the user? You can then add it to `public_user_custom_fields` in the admin section and it’ll be included in the user. Be careful about using that for private information though.

---

<div class="post-metadata">

### Author: ![rohmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rohmann/32/120852_2.png) [@rohmann](https://meta.discourse.org/u/rohmann)
#### Post date: [May 25, 2017, 9:38pm UTC](https://meta.discourse.org/t/how-do-i-access-sso-external-id-in-widget/63378/3 "2017-05-25T21:38:01Z")

</div>

I wasn’t passing it into a custom field - just passing the required parameter. I’ll give that a try. Thanks!
