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

# Store 開発エンタイトルメント ツール (DevEntitlementTool.exe)

> コマンドライン ツール DevEntitlementTool.exe。開発サンドボックス内の XBOX テスト アカウントに対して Microsoft Store エンタイトルメントを照会、追加、削除できます。

サンドボックス内の XBOX テスト アカウントに対して Microsoft Store エンタイトルメントを照会、追加、および削除するコマンド ライン ツールです。

## 使用方法

`deventitlementtool <command> /e <testaccountemail> /s <sandboxid> [/p <productid>] [...]`

| コマンド                | 説明                                |
| ------------------- | --------------------------------- |
| [query](#query)     | アカウントが所有するエンタイトルメントを検索します         |
| [add](#add)         | 指定した 1 つ以上のエンタイトルメントをアカウントに追加します  |
| [delete](#delete)   | 指定した 1 つ以上のエンタイトルメントをアカウントから削除します |
| [catalog](#catalog) | 指定した親製品によって販売可能な製品を表示します          |

すべてのコマンドで /e (電子メール) および /s (サンドボックス) パラメーターが必要です。
アカウントでの初回サインインでは、対話型パスワード入力ダイアログが起動します。
一度サインインに成功すると、そのデバイス上の同じアカウント/サンドボックスでの以降の操作ではパスワード入力は不要になります。

## query

`deventitlementtool query /e <testaccountemail> /s <sandboxid> [/d]`

サンドボックス内でこのアカウントに関連付けられた、直接所有しているすべてのエンタイトルメントを一覧表示します。

### query の出力

```text theme={null}
Entitlements found: {Number of entitlements}
{ProductID}: {Last Updated Date (UTC)} {Status}
...
```

### query の例

```text theme={null}
> DevEntitlementTool.exe query /e xdks-testaccount00000@xboxtest.com /s XDKS.1
Entitlements found: 2
9MT5TGW893HV: 4/18/2023 5:05:19 PM  Active
9N30KZZF4BR9: 7/24/2024 2:34:08 AM  Active
```

各エンタイトルメントの詳細をさらに表示するには /d を使用します。

```text theme={null}
> DevEntitlementTool.exe query /e xdks-testaccount00000@xboxtest.com /s XDKS.1 /d
Entitlements found: 2
9MT5TGW893HV: 4/18/2023 5:05:19 PM  Active Consumable   ATG Sample Consumable 3
9N30KZZF4BR9: 7/24/2024 2:34:08 AM  Active Durable      ATG Sample Durable 1
```

## add

`deventitlementtool add /e <testaccountemail> /s <sandboxid> /p <productid1> [<productid2> <productid3> ...] [/q <quantity>] [/d]`

指定した 1 つ以上の製品のエンタイトルメントをアカウントに追加します。
このコマンドは、Store または購入 API を通じて製品を購入することと同等です。

既にエンタイトルされている Game、Durable、Bundle、または開発者管理型 (Developer-Managed) の Consumable に対する `add` 操作は、別のエンタイトルメントを追加せず、既存のエンタイトルメントを報告します。

Store 管理型 Consumable 製品の場合、各 add コマンドで既定の数量 `1` が Consumable 残高に追加されます。
この既定値を変更するためにオプションで数量値を指定できますが、数量フィールドは /p で 1 つの productID が渡された場合にのみ使用できます。
このオプションは、購入時に `1` より大きい数量を付与する Consumable に役立ちます。

/d の詳細表示もサポートされています。

<Note>このツールでは数量を確認できません。</Note>
アイテムの現在の数量を確認するには、[XStoreCollectionData](/reference/system/xstore/structs/xstorecollectiondata) 構造体を確認してください。

Bundle 製品に対する `add` 操作では、その Bundle に含まれるすべての製品が付与されます。
数量が指定され、Bundle に Store 管理型 Consumable が含まれている場合、各 Consumable に同じ数量が割り当てられます。

<Note>サブスクリプション製品はサポートされていません。</Note>

### add の出力

```console theme={null}
Entitlements added: {Number of entitlements}
{ProductID}: {Last Updated Date (UTC)} {Status}
...
```

### add の例

単一のエンタイトルメントを追加

```console theme={null}
> DevEntitlementTool.exe add /e xdks-test00000@xboxtest.com /s XDKS.1 /p 9MT5TGW893HV
Entitlements added: 1
9MT5TGW893HV: 2/20/2024 12:21:25 AM Active
```

複数のエンタイトルメントを追加

```console theme={null}
> DevEntitlementTool.exe add /e xdks-test00000@xboxtest.com /s XDKS.1 /p 9P23V43P0XZZ 9N30KZZF4BR9 9NCX1H100M18
Entitlements added: 4
9P23V43P0XZZ: 2/20/2024 12:33:20 AM Active
9N30KZZF4BR9: 2/20/2024 12:33:20 AM Active
9NCX1H100M18: 2/20/2024 12:33:20 AM Active
```

数量を指定して Consumable を追加

```console theme={null}
> DevEntitlementTool.exe add /e xdks-test00000@xboxtest.com /s XDKS.1 /p 9MT5TGW893HV /q 4321
Entitlements added: 1
9MT5TGW893HV: 2/20/2024 12:34:35 AM Active
```

## delete

`deventitlementtool delete /e <testaccountemail> /s <sandboxid> /p <productid1> [<productid2> <productid3> ...] [/all] [/d]`

指定した 1 つ以上のエンタイトルメントをアカウントから削除します。

`/all` を指定すると、アカウントおよびサンドボックスに関連付けられたすべてのエンタイトルメントの削除を試みます。

このツールで付与したエンタイトルメントを削除すると、Revoked ステータスが表示されます。

Store クライアントまたはゲーム内 API を通じて通常の方法で購入したエンタイトルメントを削除すると、Refunded ステータスが表示されます。

/d の詳細表示もサポートされています。

### delete の出力

```console theme={null}
Entitlements deleted: {Number of entitlements}
{ProductID}: {Last Updated Date (UTC)} {Status}
...
```

### delete の例

```console theme={null}
> DevEntitlementTool.exe delete /e xdks-test00000@xboxtest.com /s XDKS.1 /p 9P23V43P0XZZ 9N30KZZF4BR9 9NCX1H100M18
Entitlements deleted: 3
9P23V43P0XZZ: 2/20/2024 2:26:13 AM Revoked
9N30KZZF4BR9: 2/20/2024 2:26:13 AM Revoked
9NCX1H100M18: 2/20/2024 2:26:13 AM Revoked
```

```console theme={null}
> DevEntitlementTool.exe delete /e xdks-test00000@xboxtest.com /s XDKS.1 /p 9PLRFWZWWF91
Entitlements deleted: 1
9PLRFWZWWF91: 1/1/0001 12:00:00 AM Refunded
```

## catalog

`deventitlementtool catalog /e <testaccountemail> /s <sandboxid> /p <productid1> [/m]`

指定した製品 ID によって販売可能な製品のセット (すなわち、子アドオン製品、およびパートナー センターで productID に対して *can use and sell* の関係を持つ製品) を表示します。
このコマンドは、[XStoreQueryAssociatedProductsAsync](/reference/system/xstore/functions/xstorequeryassociatedproductsasync) が返すものと同等です。
パートナー センターで *Microsoft Store で利用可能だが検出できない (available but not discoverable in the Microsoft Store)* として構成されている製品は返されません。
オプションでマーケットを指定して、その特定のマーケットの価格を取得できます。
このパラメーターは、GB、CA、JP、ES など、ISO の 2 文字リージョン コードである必要があります。

### catalog の出力

```console theme={null}
Parent product: {ProductID} ({Parent Product Name})
can sell {Number of products} products:
1. {ProductID} {Product Name} {Product Type} {Price}
2. {ProductID} {Product Name} {Product Type} {Price}
...
```

### catalog の例

```console theme={null}
> DevEntitlementTool.exe catalog /e xdks-test00000@xboxtest.com /s XDKS.1 /p 9NTL0QDWZ4FS /m SG
Parent product: 9NTL0QDWZ4FS (ATG In-Game Store)
can sell 16 products:
 1. 9PHPTTDP88F7: ATG Season Pass 1                        Durable      23.25 SGD
 2. 9NMDDZC7ZWRM: ATG Sample Year 1 Pass                   Durable      2850 SGD
 3. 9PGLXLWS7319: ATG Consumable Only Bundle               Durable      7.2 SGD
 4. 9P23V43P0XZZ: ATG Sample Durable 2                     Durable      0 SGD
 5. 9MZ0MGGFPLTP: ATG Sample Subscription 1                Durable      0 SGD
 6. 9MT5TGW893HV: ATG Sample Consumable 3                  Consumable   4.35 SGD
 7. 9N30KZZF4BR9: ATG Sample Durable 1                     Durable      0 SGD
 8. 9PLRFWZWWF91: ATG Sample Durable 4                     Durable      0 SGD
 9. 9PLNMXRKNM4C: ATG Sample Durable 1 (with package)      Durable      0 SGD
10. 9P8S15PJTB0P: ATG Sample Durable 3                     Durable      48.75 SGD
11. 9NCX1H100M18: ATG Sample Consumable 2                  Consumable   2.85 SGD
12. 9N0297GK108W: ATG Dev managed consumable 1             Consumable   2.1 SGD
13. 9NQWJKKNHF1L: ATG Downloadable Content Sample          Game         0 SGD
14. 9NRGW2QG5PCW: ATG Sample Pre-Order 1                   Durable      0 SGD
15. 9PHHWZ12RR23: ATG In-Game Store Deluxe Add-on          Durable      0 SGD
16. 9PFL4RQTB1P6: ATG Sample Consumable 1                  Consumable   1.5 SGD
```

## 備考

このツールは XBOX テスト アカウントとサンドボックス製品での使用にのみ限定されます。
小売アカウントとシナリオでの使用はブロックされています。

アカウントごとに 1 日あたりの追加および削除操作には制限があります。
この制限は観測された使用状況に基づいて調整されます。
制限の引き上げ要求やその他のフィードバックには、Microsoft のアカウント担当者を通じてご連絡ください。

## API リファレンス ドキュメント

* [XStore (API コンテンツ)](/reference/system/xstore/xstore_members)
  * 関数
    * [XStoreQueryAssociatedProductsAsync](/reference/system/xstore/functions/xstorequeryassociatedproductsasync)
  * 構造体
    * [XStoreCollectionData](/reference/system/xstore/structs/xstorecollectiondata)


## Related topics

- [XBOX サービス向け開発ツール](/ja-jp/tools/tools-services/live-tools.md)
- [XBOX サービス向けツール](/ja-jp/tools/tools-services/live-tools-nav.md)
- [XStore 開発のトラブルシューティング](/ja-jp/publishing/xstore-commerce/xstore-troubleshooting.md)
- [XBOX および PlayFab 向けのライブ サービス ツール](/ja-jp/tools/tools-services/index.md)
- [XStoreCollectionData](/ja-jp/reference/system/xstore/structs/xstorecollectiondata.md)
