# How to seed local database with SSO user data

**URL:** <https://meta.discourse.org/t/how-to-seed-local-database-with-sso-user-data/53210>\
**Category:** Development\
**Created:** [21 Novembre 2016, 7:09pm UTC](https://meta.discourse.org/t/how-to-seed-local-database-with-sso-user-data/53210 "2016-11-21T19:09:41Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [21 Novembre 2016, 7:09pm UTC](https://meta.discourse.org/t/how-to-seed-local-database-with-sso-user-data/53210/1 "2016-11-21T19:09:41Z")

</div>

I’ve got a client that I’m doing an import for. They’re using SSO, which will supply avatars, but of course those get populated only when someone logs in. I noticed `client.sync_sso` and it appears to do just what I need. I think I’d like to do this from the API, but rails console would be fine too.

I thought that `client.sync_sso` would work, but it appears to **push** SSO data, not **pull** SSO data.

Is there some way that I can suck down the SSO data for each user? It doesn’t look like the API will help, maybe something in the console? Looks like `lookup_or_create_user` might help, but I can’t find the `external_id`.

---

_[View the full topic](https://meta.discourse.org/t/how-to-seed-local-database-with-sso-user-data/53210)._
