Skip to main content
PlayFab is Microsoft’s backend-as-a-service for live games — economy, catalogs, leaderboards, cloud script, analytics, matchmaking, and PlayFab Party voice/data networking. It layers cleanly on top of XBOX services. XBOX services owns the player-facing identity (gamertag, friends, achievements, presence, MPSD sessions), and PlayFab owns the backend live-service data (inventory, currency, custom user data, telemetry). Any GDK title that uses PlayFab Party, PlayFab economy for Microsoft Store in-app purchase, PlayFab leaderboards, or any other PlayFab service must sign the player into both stacks and keep the two identities linked.
This page focuses on the XBOX-side of the integration — how to provision a PlayFab account tied to the signed-in XUser, and how the Microsoft Store entitlement flow plumbs into PlayFab economy. For the full PlayFab feature surface (Game Manager, catalogs, cloud script, matchmaking, Party), see the PlayFab documentation.

XBOX and PlayFab user accounts

An XBOX services account and a PlayFab account are two separate identities:
  • XBOX services account — player-facing. Owned by the player’s Microsoft Account (MSA). Carries gamertag, XUID, friends, achievements, presence.
  • PlayFab account — behind-the-scenes. Identified by an Entity ID inside your PlayFab TitleId (a 4–6 hex-digit string assigned when you create a title in PlayFab Game Manager). Not the same as your XBOX title ID.
To use any PlayFab feature (Party voice chat, economy, leaderboards) in your GDK title, every signed-in XUser must have a linked PlayFab account provisioned in the context of your PlayFab title. By the end of the sign-in flow:
  • The player has been added with XUserAddAsync and holds an XUserHandle.
  • A PlayFab account exists for that player under your PlayFab TitleId (auto-provisioned on first sign-in).
  • The XBOX and PlayFab accounts are linked, and the title holds valid credentials (Entity ID + PlayFab token) for authenticated PlayFab REST/SDK calls.
Your PlayFab TitleId is not the same as your XBOX title ID. Provision one PlayFab title per game (or per shard) in PlayFab Game Manager and hard-code that TitleId in your build config.

Sign players in to PlayFab

There are two supported sign-in paths. Pick one based on which PlayFab services you use:

PlayFab Services SDK

Recommended for all titles. Ships as a Gaming Extension Library (PlayFab.Services.C) in the GDK. Use for economy, leaderboards, cloud script, matchmaking, and any title that uses more than just Party.

PlayFab Party Xbox Live Helper Library

Use only if PlayFab Party is the sole PlayFab service you use and XBOX services is your only auth provider. Ships with the PlayFab Party SDK inside the GDK.
The PlayFab Services SDK ships with the GDK and exposes PFAuthenticationLoginWithXUserAsync, which takes an XUserHandle and signs the player into PlayFab in one call. Set createAccount = TRUE to auto-provision the linked PlayFab account on first run. Set up
  1. Install the GDK.
  2. Add the PlayFab.Services.C Gaming Extension Library to your project:
    • Open the project in Visual Studio → ProjectProperties.
    • Under Configuration PropertiesGaming DesktopGeneral, open Gaming Extension Libraries and add PlayFab.Services.C.
Recommended sign-in flow
  1. Sign the player into their XBOX account with XUserAddAsync and hold onto the returned XUserHandle.
  2. Call PFAuthenticationLoginWithXUserAsync:
    • Pass the XUserHandle as the user parameter.
    • Set createAccount = TRUE so PlayFab auto-provisions a linked account on first sign-in.
  3. Persist the resulting PlayFab credentials (Entity ID + PlayFab token) for the session and use them for all subsequent PlayFab calls.
See the PlayFab Services SDK Quickstart for GDK for the full walkthrough.

PlayFab Party XBOX Live Helper Library

If PlayFab Party is the only PlayFab service your title uses, you can skip the PlayFab Services SDK and sign in via the Party XBOX Live Helper Library, which is bundled with the PlayFab Party SDK in the GDK. Flow
  1. Sign the player into XBOX with XUserAddAsync.
  2. When chat is first initiated, retrieve the XUID with XUserGetId.
  3. Create a PartyXblLocalChatUser by calling PartyXblManager::CreateLocalChatUser with the XUID.
  4. Call PartyXblManager::LoginToPlayFab with that user object.
    • On GDK (console and PC) and XDK, the helper library internally fetches the required XBOX services token, signs the player into PlayFab using their XBOX credentials, and auto-creates a PlayFab account on first sign-in. Accounts created this way have no email or username attached.
    • On non-GDK/non-XDK titles (for example, PC Win32 without GDK) you receive a PartyXblTokenAndSignatureRequestedStateChange instead. Fetch the XBOX services token yourself and pass it back via PartyXblManager::CompleteGetTokenAndSignatureRequest.
  5. On success you receive a PartyXblLoginToPlayFabCompletedStateChange carrying the PlayFab Entity ID and token.
For remote users, use PartyXblManager::CreateRemoteChatUser — no authentication or token exchange is required for the remote user flow.

XUser is the identity bridge

Everything downstream — PlayFab sign-in, MPSD session write tokens, S2S calls, entitlement queries — begins with an XUserHandle returned from XUserAddAsync. Two APIs matter for PlayFab integration: See XBOX services identity for the wider sign-in model (MSA, XSTS tokens, sandbox scoping).

Cross-platform titles

PlayFab supports many platform auth providers. When you ship the same title on iOS, Android, Steam, or PlayStation, do not try to route every player through XUser — use the platform’s native PlayFab auth provider:
  • iOS — Apple ID (LoginWithApple).
  • Android — Google Play Games (LoginWithGoogleAccount).
  • SteamLoginWithSteam.
  • XBOX / GDK PCPFAuthenticationLoginWithXUserAsync (this page).
Each platform sign-in provisions its own PlayFab account and links it to the same PlayFab title. Players who move across platforms with the same PlayFab account get their linked identities merged inside PlayFab. See Platform-specific PlayFab authentication for the full matrix.

Microsoft Store in-app purchase via PlayFab economy

For GDK titles that sell in-app items through the Microsoft Store, PlayFab acts as the economy backend while the Microsoft Store handles the actual transaction. PlayFab reconciles Microsoft Store purchases into the player’s PlayFab inventory using the entitlement method — the player must be signed into their XBOX account first.

The flow

  1. Player is signed in to XBOX (XUserAddAsync) and PlayFab (PFAuthenticationLoginWithXUserAsync).
  2. Player buys an item through the Microsoft Store on-device.
  3. Your title notifies PlayFab of the purchase.
  4. PlayFab calls ConsumeMicrosoftStoreEntitlements with the XBOX token and syncs the player’s PlayFab inventory, granting any new items.
For GDK titles use the Microsoft Store PlayFab add-on and ConsumeMicrosoftStoreEntitlements. Do not use the legacy XBOX add-on / ConsumeXboxEntitlements (that path is for XDK titles only). The Universal Windows Platform add-on is deprecated.

Partner Center prerequisites

  • Enrolled in the XBOX Creators Program or a Managed Partner.
  • Publisher identity configured in Partner Center with the same publisher GUID as your XBOX business partner information (aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee).
  • Concept approval to use XBOX services.
In Partner Center, under Game setup → XBOX services, choose either Use full XBOX services feature set (requires concept approval) or Use XBOX Creators Program, then create your add-ons under your title.
PlayFab’s Microsoft Store add-on does not support store-managed consumables in Partner Center. Create developer-managed consumables (or durables) only.

Create matching items in Partner Center and PlayFab

The Product ID in Partner Center and the Item ID in PlayFab must match exactly for entitlement sync to work.
  1. In Partner Center → Add-onsCreate a new Consumable (Developer-managed) (or Durable). Enter a unique Product ID (for example, MyItem_001).
  2. In PlayFab Game ManagerEngageEconomyNew item. Enter the same string in Item ID (MyItem_001). Mark it Consumable or Durable to match Partner Center, and save.

Terminology reference

Catalogs and Stores — one Item ID globally

PlayFab lets you define multiple Catalogs per title, and within each Catalog you can group items into Stores. For Microsoft Store entitlement sync to work, each Product ID must match exactly one Item ID across all Catalog versions in your PlayFab title.
If the same Item ID appears in more than one Catalog, entitlement consumption will fail. Keep item IDs globally unique across every Catalog in a given PlayFab title.
Wrong — same ID reused across catalogs: Right — one Item ID per SKU, reused across Stores freely: Stores inside a Catalog can then bundle any subset of those unique items freely:

See also

Last modified on August 20, 2026