/users/by-external route doesn't support external_id values with "." in them


(Ryan Fox) #1

I noticed that the API includes a by-external route, which seems to allow you to get user data by the SSO external id, which is great. Unfortunately, it doesn’t seem to work with external_ids that have periods in them.

It looks like this is a common issue with Rails. Could you fix this?

Thanks!


(Ryan Fox) #2

I made a pull request: Allow periods in the external_id value used in the /users/by-external route. by rcfox · Pull Request #3163 · discourse/discourse · GitHub

I barely know what I’m doing with Ruby and next to no idea about Rails, so I’m not sure if there’s a better way to do this.


(Ryan Fox) #3

It’s been over two weeks since I reported this bug… It’d be nice to hear if this is something you plan to fix, or not.

Thanks.


(Michael Downey) #4

See also this for some back discussion:


(Martin Duparc) #5

UPDATED:
Here is the correct url: mydiscoursesite.com/users/by-external/1.json

I am having problems using the by-external route.

Should the following url work?
mydiscoursesite.com/users/by-external/1 (1 being the external id from the SSO user table)

cc @mbeale