> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XUserGetAgeGroup

> XUserGetAgeGroup

# XUserGetAgeGroup

Returns the age group of a user.

## Syntax

```cpp theme={null}
HRESULT XUserGetAgeGroup(  
         XUserHandle user,  
         XUserAgeGroup* ageGroup  
)  
```

### Parameters

*user*   \_In\_\
Type: XUserHandle

The user to get the age group of.

*ageGroup*   \_Out\_\
Type: [XUserAgeGroup\*](/reference/system/xuser/enums/xuseragegroup)

Contains the age group of the user.

### Return value

Type: HRESULT

HRESULT success or error code.

| Return Code                                 | Description                                                                                                                                                                     |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| S\_OK                                       | The operation succeeded.                                                                                                                                                        |
| E\_GAMEUSER\_RESOLVE\_USER\_ISSUE\_REQUIRED | The user must use a UI to resolve the issue. Call [XUserResolveIssueWithUiAsync](/reference/system/xuser/functions/xuserresolveissuewithuiasync) to display the UI to the user. |

## Remarks

Retrieves the user's [XUserAgeGroup](/reference/system/xuser/enums/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](/reference/system/xuser/functions/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](/reference/system/xuser/xuser_members)

[XUserResolveIssueWithUiAsync](/reference/system/xuser/functions/xuserresolveissuewithuiasync)


## Related topics

- [XUserAgeGroup](/reference/system/xuser/enums/xuseragegroup.md)
- [XR-014 Player Data and Personal Information](/publishing/certification/xr/xr-014.md)
- [XUserGetGamertag](/reference/system/xuser/functions/xusergetgamertag.md)
- [XUserGetMaxUsers](/reference/system/xuser/functions/xusergetmaxusers.md)
- [XUserGetLocalId](/reference/system/xuser/functions/xusergetlocalid.md)
