> ## 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.

# MicrosoftGame.config 元素 - MSAAppId

> MicrosoftGame.config 元素 - MSAAppId

# MicrosoftGame.config 元素 - MSAAppId

指定遊戲的 MSA 應用程式識別碼，此識別碼會與 XBOX Live 遊戲識別碼 (如下所示) 搭配使用，以向 XBOX Live 服務進行身分識別。自 2022 年 3 月 GDK 起，若已指定 TitleId 元素，新遊戲現在必須提供 MSA 應用程式識別碼。此需求是透過 MicrosoftGame.config 結構描述版本更新 (從 configVersion 0 更新為 configVersion 1) 強制執行，且僅適用於使用 2022 年 3 月 GDK 及更新版本建立的新遊戲。

## 父系

此元素的父系是 Game 元素。

## 需求

若 MicrosoftGame.config 中的 configVersion = 0，此元素為選用，不需要設定。
若 MicrosoftGame.config 中的 configVersion = 1，則在下列情況下必須設定此元素：

* 已指定 TitleId 元素。
* 已指定 NoCodePCRoot 元素。
* AdvancedUserModel 元素設定為 false 值。

## 平台

此元素適用於 PC 和主機。

## 行為

* 沒有屬性。
* 沒有預設值。
* 允許的值為任何非空白字串。

## 備註

* MSAAppId 的值通常是 16 個字元的整數字串。
* MSAAppId 元素是從 Partner Center 產生的身分識別碼。您可以在 Partner Center 專案的 [XBOX 服務 -> XBOX 設定索引標籤](/zh-TW/services/xbox-services/fundamentals/portal-config/live-setup-partner-center-partners)中找到。
* 您 MicrosoftGame.config 中的 MSAAppId 元素必須與 Partner Center 中的值相符。[MicrosoftGame.config 編輯器](/zh-TW/build/core-features/common/game-config/MicrosoftGameConfig-Editor)提供名為「市集關聯精靈」的工具，可自動將 MSAAppId (及其他識別碼值) 的本機 .config 值與您產品在 Partner Center 中的值同步。
* 若您的遊戲使用遊戲繫結，MSAAppId 元素的行為會有所不同。如需詳細資訊，請參閱[遊戲繫結概觀](/zh-TW/services/xbox-services/fundamentals/game-binding/game-binding-overview)。
* Visual Studio 新專案範本會為此元素提供預設值 'PleaseChangeMe'。此值可讓您在早期反覆開發時編譯遊戲，而不必立即從 Partner Center 取得識別碼。強烈建議您在遊戲可以建置後立即變更此識別碼，以避免嘗試進行 XUser API 呼叫時失敗。

## 另請參閱

[MicrosoftGame.config 參考 - 目錄](/zh-TW/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)


## Related topics

- [MicrosoftGame.config Element - MSAAppId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-msaappid.md)
- [MicrosoftGame.config 元素 - TitleId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-titleid.md)
- [MicrosoftGame.config 元素 - AdvancedUserModel](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-advancedusermodel.md)
- [MicrosoftGame.config 元素 - StoreId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-storeid.md)
- [MicrosoftGame.config 要素 - MSAAppId](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-msaappid.md)
