Skip to main content

XUserGetAgeGroup

Returns the age group of a user.

Syntax

Parameters

user   _In_
Type: XUserHandle
The user to get the age group of. ageGroup   _Out_
Type: XUserAgeGroup*
Contains the age group of the user.

Return value

Type: HRESULT HRESULT success or error code.

Remarks

Retrieves the user’s XUserAgeGroup. E_GAMEUSER_RESOLVE_USER_ISSUE_REQUIRED indicates there is a problem that the user needs to resolve using system UI before the code can retrieve the property. In that case, XUserResolveIssueWithUiAsync can be used to trigger the system UI needed to resolve the issue.

Requirements

Header: XUser.h Library: xgameruntime.lib Supported platforms: Windows, Steam Deck, XBOX One family consoles and XBOX Series consoles

See also

XUser XUserResolveIssueWithUiAsync
Last modified on August 20, 2026