# SSO - custom picture not getting updated again once it is updated initially

**URL:** https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507
**Category:** Support
**Tags:** rest-api
**Created:** [December 27, 2024, 6:07am UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507 "2024-12-27T06:07:48Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Nitin\_Digraje](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nitin_digraje/32/476589_2.png) [@Nitin\_Digraje](https://meta.discourse.org/u/Nitin_Digraje)
#### Post date: [December 27, 2024, 6:07am UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/1 "2024-12-27T06:07:48Z")

</div>

We are integrating discourse with Php/Laravel platform where we have implemented SSO. Users custom picture getting updated only once. However if i change profile picture in laravel platform, custom picture not updated in discourse again even after i logout and login again.

Even though i have passed ‘avatar\_force\_update’ as true, avatar custom picture is not getting overriden.

---

<div class="post-metadata">

### Author: ![Nitin\_Digraje](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nitin_digraje/32/476589_2.png) [@Nitin\_Digraje](https://meta.discourse.org/u/Nitin_Digraje)
#### Post date: [December 27, 2024, 6:36am UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/2 "2024-12-27T06:36:16Z")

</div>

Just to update

I can see profile picture url updated SSO record, however new profile image is not reflected in discourse even after i logout and login again.

---

<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: [December 28, 2024, 3:10pm UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/4 "2024-12-28T15:10:13Z")

</div>

What if you reload your browser?

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [December 28, 2024, 3:55pm UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/5 "2024-12-28T15:55:37Z")

</div>

Do you have the `discourse_connect_overrides_avatar` site setting enabled?

---

<div class="post-metadata">

### Author: ![Nitin\_Digraje](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nitin_digraje/32/476589_2.png) [@Nitin\_Digraje](https://meta.discourse.org/u/Nitin_Digraje)
#### Post date: [December 30, 2024, 7:00am UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/6 "2024-12-30T07:00:47Z")

</div>

Thank you for reply. If I reload browser or open in incognito or even logout and login again, it doesnt get updated.  
As mentioned, it gets updated only first time. For example

- New user has avatar and connects discourse first time using sso, avatar gets updated
- Or user doesnt have avatar initially, and updates avatar in platform and in that case it gets reflected in discourse
- But user has one avatar and if he updates new avatar in platform, it doesnt get updated in discourse even though if i logout/login again, or try in different browser.I can see profile picture url updated SSO record, but the avatar doesnt get updated.

---

<div class="post-metadata">

### Author: ![Nitin\_Digraje](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nitin_digraje/32/476589_2.png) [@Nitin\_Digraje](https://meta.discourse.org/u/Nitin_Digraje)
#### Post date: [December 30, 2024, 7:03am UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/7 "2024-12-30T07:03:14Z")

</div>

> [@renato](#):
>
> discourse\_connect\_overrides\_avatar

Thank you for you reply Renato! I dont have any other checkboxes ticked

 ![Screenshot 2024-12-30 at 12.32.29 PM](https://global.discourse-cdn.com/meta/original/4X/9/2/8/92880c6e4877bdf516c6f2dbbe8011cb0b6e6be3.png)

---

<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: [December 30, 2024, 4:56pm UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/8 "2024-12-30T16:56:48Z")

</div>

You can try turning on verbose logging and looking at the logs to see if the SSO system is sending over the avatar info.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [January 1, 2025, 2:41am UTC](https://meta.discourse.org/t/sso-custom-picture-not-getting-updated-again-once-it-is-updated-initially/344507/9 "2025-01-01T02:41:42Z")

</div>

> [@Nitin\_Digraje](#):
>
> I dont have any other checkboxes ticked

It might be worth enabling the `discourse connect overrides avatar` setting, logging out of Discourse, then logging back in again. I’m fairly sure it’s expected that the avatar can be updated without that setting enabled as long as the `avatar_force_update` parameter is set to `true` in the SSO payload. The code that handles this is kind of complex though: [discourse/app/models/discourse\_connect.rb at 2ff3f44b957268718e03554fb25d485e1d449ed5 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/2ff3f44b957268718e03554fb25d485e1d449ed5/app/models/discourse_connect.rb#L366-L378).

If you can’t enable that setting, or are just curious about what’s going on, another thing to check is to make sure that the value you’re passing for the `avatar_force_update` parameter is being interpreted as the boolean `true` by Discourse. There are frameworks (notably WordPress) where boolean values get converted to `0` or `1`. To work around that issue, Discourse will accept the string `"true"` as a boolean value in the SSO payload. You can probably confirm this by looking at the value of the `avatar_force_update` field in the SSO record that’s displayed on the user’s admin page. Or by enabling the verbose logging setting that Jay mentioned.
