external_id is something that is pushed from the app end to discourse while creating the user (the app is the identity provider in this case)
What we need is a parameter in the url that discourse sends us to when we click on login. Does Discourse offer this?