# Using Discourse API to return user data when the "Require authentication to read content on this site, disallow anonymous access." setting is checked

**URL:** <https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404>\
**Category:** Bug\
**Tags:** rest-api\
**Created:** [06.Май.2015 22:11:49 UTC](https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404 "2015-05-06T22:11:49Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![asko](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@asko](https://meta.discourse.org/u/asko)\
**Post date:** [06.Май.2015 22:11:49 UTC](https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404/1 "2015-05-06T22:11:49Z")

</div>

Hi,

I enabled the setting “Require authentication to read content on this site, disallow anonymous access”.

I’m making a GET request to the /users/by-external/{EXTERNAL\_ID}.json endpoint, and without the above setting enabled, it returns a user perfectly fine. But when I enable the above setting, the GET request returns nothing.

For reference, I have SSO enabled.

Let me know if there’s a workaround or if I’m thinking about this incorrectly.  
Thanks in advance!

---

_[View the full topic](https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404)._
