> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/2.1/for-developers/rest-api/core/oauth2/get-the-claims-of-the-authenticated-user.md).

# Get the claims of the authenticated user

Requires an access token in the `Authorization: Bearer <token>` header. Implements the [OpenID Connect UserInfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo).

```json
{"openapi":"3.1.0","info":{"title":"defguard Core API","version":"2.1.0"},"tags":[{"name":"OAuth2","description":"defguard acting as an OAuth2 / OpenID Connect provider for other applications."}],"paths":{"/api/v1/oauth/userinfo":{"get":{"tags":["OAuth2"],"summary":"Get the claims of the authenticated user","description":"Requires an access token in the `Authorization: Bearer <token>` header. Implements the\n[OpenID Connect UserInfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo).","operationId":"userinfo","responses":{"200":{"description":"Claims of the authenticated user.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Access token is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unable to get user claims.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}},"components":{"schemas":{"ApiErrorResponse":{"type":"object","description":"Body returned with error responses.","required":["msg"],"properties":{"code":{"type":["string","null"],"description":"Machine-readable error code, returned for selected errors."},"msg":{"type":"string","description":"Human-readable error message."}}}}}}
```
