Hmm, ok. If you’re using DiscourseConnect, from reading the code, it looks like you can’t add the external id when creating. The code just above only handles associated accounts which are different from SSO.
Can you try making two calls: first call the same as you have now, but without the external ids, and add a second call to updateUser, including the external id info? Hopefully that works.