# （已退役）使用自定义用户字段中的ID链接到用户的外部资料

**URL:** <https://meta.discourse.org/t/retired-use-an-id-in-a-custom-user-field-to-link-to-a-users-external-profile/41218>\
**Category:** Site Management\
**Created:** [2016年三月17日 17:43 UTC](https://meta.discourse.org/t/retired-use-an-id-in-a-custom-user-field-to-link-to-a-users-external-profile/41218 "2016-03-17T17:43:28Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![daath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daath/32/115536_2.png) [@daath](https://meta.discourse.org/u/daath)\
**Post date:** [2016年三月20日 01:22 UTC](https://meta.discourse.org/t/retired-use-an-id-in-a-custom-user-field-to-link-to-a-users-external-profile/41218/12 "2016-03-20T01:22:51Z")

</div>

Ok, so no way to get to single\_sign\_on\_record then?

Am I understading [the code you referred to](https://github.com/discourse/discourse_api/blob/master/lib/discourse_api/api/sso.rb#L14-L16) correctly, in that I should supply a field named “custom\_external\_id” with my SSO - then it will save to the custom field “custom\_external\_id” (it has to be prefixed “custom”), right?

Is there an easier way to traverse all users and set the new custom field, other than to write a script that calls sync\_sso on the thousands of users? It seems a lot of work to get to a field we already have in the system 🙂

---

_[View the full topic](https://meta.discourse.org/t/retired-use-an-id-in-a-custom-user-field-to-link-to-a-users-external-profile/41218)._
