# Synchronizing Changes for SSO users

**URL:** https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270
**Category:** SSO
**Tags:** discourseconnect
**Created:** [May 26, 2015, 2:33pm UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270 "2015-05-26T14:33:42Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Ply\_py](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ply_py/32/116164_2.png) [@Ply\_py](https://meta.discourse.org/u/Ply_py)
#### Post date: [May 26, 2015, 2:33pm UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/1 "2015-05-26T14:33:42Z")

</div>

Hi here. We used the SSO feature to connect the Discourse with our own account. As we manage accounts info on our own sites, we enabled email overriding, username overriding and name overriding. However, when a user changed his info, say email, the modification won’t be on effect until the user login Discourse, and he may lose some notification emails during this period.

I’ve tried the [Discourse API](https://meta.discourse.org/t/discourse-api-documentation/22706).Yet, it seems that the `PUT` method for user’s email is being prohibited. What’s more, if I uncheck the email overriding, the `PUT` request I send will trigger a verification email. That’s not the way I wanted, as you see we’ve already done the verification on our own SSO site, so it’s totally redundant. But I haven’t found an option to turn off that verification email.

Can someone help me here, thanks.

---

<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: [May 26, 2015, 11:23pm UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/2 "2015-05-26T23:23:48Z")

</div>

There is an endpoint for synchronizing sso you should be using that

> <https://github.com/discourse/discourse_api/blob/f2f8195da0e430c254021add675f89766c2b0647/lib/discourse_api/api/sso.rb>

---

<div class="post-metadata">

### Author: ![Ply\_py](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ply_py/32/116164_2.png) [@Ply\_py](https://meta.discourse.org/u/Ply_py)
#### Post date: [May 27, 2015, 1:51am UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/3 "2015-05-27T01:51:02Z")

</div>

Thanks, it’s really helpful.

And one more question about account creation. This post [How to import SSO users](https://meta.discourse.org/t/how-to-import-sso-users/25139/11) suggests that we can use this endpoint `POST /users` to import a SSO user. However, sometimes the username we use will contradict with Discourse’s restrictions, specifically our account may have “.” (Dot). Moreover, it will send welcome message as well, what’s the correct way to do this?

---

<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: [May 27, 2015, 2:06am UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/4 "2015-05-27T02:06:09Z")

</div>

We don’t have any sample for this pre-staging, you would need to use the object model direct.

@techAPJ we should have a discourse api sample for this and add missing endpoints.

---

<div class="post-metadata">

### Author: ![AdamCapriola](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adamcapriola/32/5192_2.png) [@AdamCapriola](https://meta.discourse.org/u/AdamCapriola)
#### Post date: [May 27, 2015, 6:13pm UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/5 "2015-05-27T18:13:34Z")

</div>

I posted about this a while ago:

[https://meta.discourse.org/t/sso-overrides-email-prevents-api-from-changing-email/15259](https://meta.discourse.org/t/sso-overrides-email-prevents-api-from-changing-email/15259)

An example for utilizing that endpoint would be helpful. 📖

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [June 1, 2015, 1:42pm UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/6 "2015-06-01T13:42:41Z")

</div>

The endpoint was already present, added the sample in discourse\_api:

[https://github.com/discourse/discourse\_api/pull/84](https://github.com/discourse/discourse_api/pull/84)

---

<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: [October 10, 2018, 12:08pm UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/7 "2018-10-10T12:08:12Z")

</div>



---

<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: [October 10, 2018, 11:45pm UTC](https://meta.discourse.org/t/synchronizing-changes-for-sso-users/29270/8 "2018-10-10T23:45:45Z")

</div>


