# Customize the OpenID Connect 1.0 UserInfo Response in Spring Authorization Server

DevFeed: [Customize the OpenID Connect 1.0 UserInfo Response in Spring Authorization Server](<https://devfeed.tech/articles/customize-the-openid-connect-1-0-userinfo-response-in-spring-authorization-server-129941.md>)

Original publisher: [Read original article](<https://www.baeldung.com/spring-authorization-server-openid-connect-userinfo-response-customize>)

Author: Philippe Sevestre

Published: 2026-11-11T13:16:37Z

Content type: tutorial

Language: en

Sources: [Baeldung](<https://devfeed.tech/sources/baeldung.md>)

Topics: [OpenID connect (OIDC)](<https://devfeed.tech/topics/oidc.md>), [Spring Framework](<https://devfeed.tech/topics/spring-framework.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [customization](<https://devfeed.tech/tags/customization.md>), [openid-connect](<https://devfeed.tech/tags/openid-connect.md>), [spring](<https://devfeed.tech/tags/spring.md>), [spring-mvc](<https://devfeed.tech/tags/spring-mvc.md>), [spring-mvc-spring-security-authorization](<https://devfeed.tech/tags/spring-mvc-spring-security-authorization.md>), [spring-security](<https://devfeed.tech/tags/spring-security.md>)

## AI overview

Spring Authorization Server's UserInfo endpoint can return claims from an application service, filtered by the scopes authorized for the client. The article's example maps the authenticated username to a UserInfo record, then uses a custom OidcUserInfoAuthenticationContext-to-OidcUserInfo function registered through the OIDC DSL. It adds email claims for the email scope, profile claims for profile, and account-specific claims for account; with no matching user or no relevant scopes, it returns only sub. The example uses a static map, while a real implementation could retrieve records from a database, LDAP, or REST service. The article also notes that updated_at needs a generic claim call to produce a JSON number in the described Spring version, and lists other endpoint customization hooks for request conversion, authentication providers, and response or error handling.

## Source excerpt

Learn how to customize the Spring Authorization Server UserInfo endpoint handling. The post Customize the OpenID Connect 1.0 UserInfo Response in Spring Authorization Server first appeared on Baeldung.