# What exactly does "client.sync\_sso" do? (Discourse Ruby API)

**URL:** https://meta.discourse.org/t/what-exactly-does-client-sync-sso-do-discourse-ruby-api/40612
**Category:** Development
**Created:** [March 5, 2016, 7:38am UTC](https://meta.discourse.org/t/what-exactly-does-client-sync-sso-do-discourse-ruby-api/40612 "2016-03-05T07:38:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chris\_beck](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@chris\_beck](https://meta.discourse.org/u/chris_beck)
#### Post date: [March 5, 2016, 7:38am UTC](https://meta.discourse.org/t/what-exactly-does-client-sync-sso-do-discourse-ruby-api/40612/1 "2016-03-05T07:38:34Z")

</div>

Does it perform some sort of db query?

Does it only search among currently logged in users?

When I pass a table to “sync”, can that change the logged-in status or  
DB status? Or is it only “fill in this query with data from (a?) matching  
entry in the db?”

I didn’t find any documentation that explained it, thanks!

(Note: Moved from [here](https://github.com/discourse/discourse_api/issues/104))

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 6, 2016, 6:20am UTC](https://meta.discourse.org/t/what-exactly-does-client-sync-sso-do-discourse-ruby-api/40612/2 "2016-03-06T06:20:34Z")

</div>

During the SSO process we (optionally depending on settings) synchronize a bunch of details on the users table, stuff like email,username,name,avatar and custom fields.

Occasionally you may want update all this information without a user needing to log off and log on to Discourse.

For cases like this you would define and admin API key and ship the SSO payload to sync\_sso so it will update the user details.
