# Auth0 /userinfo endpoint is returning 200 with empty response body

**URL:** <https://community.auth0.com/t/auth0-userinfo-endpoint-is-returning-200-with-empty-response-body/107934>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [May 27, 2023, 7:25am UTC](https://community.auth0.com/t/auth0-userinfo-endpoint-is-returning-200-with-empty-response-body/107934 "2023-05-27T07:25:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshayymohite](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/akshayymohite/32/47563_2.png) [@akshayymohite](https://community.auth0.com/u/akshayymohite)\
**Post date:** [May 27, 2023, 7:25am UTC](https://community.auth0.com/t/auth0-userinfo-endpoint-is-returning-200-with-empty-response-body/107934/1 "2023-05-27T07:25:31Z")

</div>

We are trying to use auth0 and we are facing an issue with /userinfo endpoint.

request\_url: https://{redacted-testing-domain}.us.auth0.com/userinfo  
request\_client\_info:  
{  
“mode”: “header”,  
“header\_format”: “Bearer %s”,  
“param\_name”: “access\_token”  
}  
request\_info:  
{  
“params”: {},  
“headers”: {  
“Authorization”: “[FILTERED]”  
}  
}

But the response returned by auth0 does not contain any user information.

get\_user\_info\_response:  
{  
“headers”: {  
“date”: “Fri, 26 May 2023 17:22:07 GMT”,  
“content-type”: “application/json; charset=utf-8”,  
“content-length”: “2”,  
“connection”: “keep-alive”,  
“cf-ray”: “7cd7b2cd7e5f387d-IAD”,  
“cf-cache-status”: “DYNAMIC”,  
“access-control-allow-origin”: “\*”,  
“cache-control”: “private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform”,  
“etag”: “W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"”,  
“set-cookie”: “[FILTERED]”,  
“strict-transport-security”: “max-age=31536000”,  
“vary”: “Origin, Accept-Encoding”,  
“access-control-allow-credentials”: “false”,  
“access-control-expose-headers”: “X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset”,  
“ot-baggage-auth0-request-id”: “f597e54146adc55d6e6b33b00960e225”,  
“ot-tracer-sampled”: “true”,  
“ot-tracer-spanid”: “6fcd1b627c1d7d14”,  
“ot-tracer-traceid”: “6e6b33b00960e225”,  
“traceparent”: “00-f597e54146adc55d6e6b33b00960e225-6fcd1b627c1d7d14-01”,  
“tracestate”: “auth0-request-id=f597e54146adc55d6e6b33b00960e225,auth0=true”,  
“x-auth0-requestid”: “384c48717d3230b10853”,  
“x-content-type-options”: “nosniff”,  
“x-ratelimit-limit”: “10”,  
“x-ratelimit-remaining”: “9”,  
“x-ratelimit-reset”: “1685121740”,  
“server”: “cloudflare”,  
“alt-svc”: “h3=":443"; ma=86400”  
},  
“raw\_body”: “{}”,  
“status”: 200  
}

Scope is set to `open profile email` on auth0 authentication \> social connection established.

What could be the possible reason? As there is no error in the http response (`raw_body` is `{}`), it’s difficult to identify the root cause to get it fixed.

Any suggestions / help is appreciated.

---

<div class="post-metadata">

**Author:** ![ssudaraka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ssudaraka/32/47564_2.png) [@ssudaraka](https://community.auth0.com/u/ssudaraka)\
**Post date:** [May 27, 2023, 9:34am UTC](https://community.auth0.com/t/auth0-userinfo-endpoint-is-returning-200-with-empty-response-body/107934/2 "2023-05-27T09:34:09Z")

</div>

Can you confirm if you’re setting the `scope` to `openid profile email` instead of `open profile email`?

---

<div class="post-metadata">

**Author:** ![akshayymohite](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/akshayymohite/32/47563_2.png) [@akshayymohite](https://community.auth0.com/u/akshayymohite)\
**Post date:** [May 27, 2023, 10:22am UTC](https://community.auth0.com/t/auth0-userinfo-endpoint-is-returning-200-with-empty-response-body/107934/3 "2023-05-27T10:22:55Z")

</div>

Yes, that was the issue. Not sure why but the value of `scope` was being set as `read` which causing the response to not contain desired attributes (maybe something related to our implementation)

Fixed by setting it to `openid profile email` and it fixed the issue.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 29, 2023, 6:47am UTC](https://community.auth0.com/t/auth0-userinfo-endpoint-is-returning-200-with-empty-response-body/107934/4 "2023-05-29T06:47:21Z")

</div>

Perfect glad to hear that and thanks for sharing it with the rest of community!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 12, 2023, 6:48am UTC](https://community.auth0.com/t/auth0-userinfo-endpoint-is-returning-200-with-empty-response-body/107934/5 "2023-06-12T06:48:23Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
