Skip to main content
Gets a list of all achievements for a player.

Syntax

Parameters

xboxUserId   _In_
Type: uint64_t
The XBOX User ID of the player. sortField   _In_
Type: XblAchievementOrderBy
The field to sort the list of achievements on. sortOrder   _In_
Type: XblAchievementsManagerSortOrder
The direction by which to sort the list of achievements. achievementsResult   _Outptr_result_maybenull_
Type: XblAchievementsManagerResultHandle*
The handle to the result of AchievementsManager API calls. This handle is used by other APIs to get the achievement objects matching the API that was called. The handle must be closed using XblAchievementsManagerResultCloseHandle when the result is no longer needed.

Return value

Type: HRESULT Returns S_OK on success. Possible error codes include the following. This list isn’t exhaustive.

Remarks

Sorting is supported only on unlock time. When sortField is XblAchievementOrderBy::UnlockTime, set sortOrder to XblAchievementsManagerSortOrder::Ascending or XblAchievementsManagerSortOrder::Descending. For any other sortField, set sortOrder to XblAchievementsManagerSortOrder::Unsorted. Other combinations return E_INVALIDARG. Passing in XblAchievementOrderBy::TitleId for sortField yields the same results as passing in XblAchievementOrderBy::DefaultOrder since all achievements tracked by achievement manager will have the same TitleId.

Requirements

Header: achievements_manager_c.h Library: Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

See also

achievements_manager_c
Last modified on October 29, 2026