StoreContext.GetCustomerPurchaseIdAsync(String, String) メソッド

定義

現在のユーザーに代わって無料製品のエンタイトルメントを付与するために使用できる Microsoft Store ID キーを取得します。

public:
 virtual IAsyncOperation<Platform::String ^> ^ GetCustomerPurchaseIdAsync(Platform::String ^ serviceTicket, Platform::String ^ publisherUserId) = GetCustomerPurchaseIdAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<winrt::hstring> GetCustomerPurchaseIdAsync(winrt::hstring const& serviceTicket, winrt::hstring const& publisherUserId);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<string> GetCustomerPurchaseIdAsync(string serviceTicket, string publisherUserId);
function getCustomerPurchaseIdAsync(serviceTicket, publisherUserId)
Public Function GetCustomerPurchaseIdAsync (serviceTicket As String, publisherUserId As String) As IAsyncOperation(Of String)

パラメーター

serviceTicket
String

Platform::String

winrt::hstring

現在のアプリの発行元を識別する Azure Active Directory アクセス トークン。 このトークンの生成の詳細については、「 サービスから製品のエンタイトルメントを管理する」を参照してください。

publisherUserId
String

Platform::String

winrt::hstring

現在のアプリの発行元として管理するサービスのコンテキストで現在のユーザーを識別する匿名 ID。 サービスのコンテキストでユーザー ID を維持する場合は、このパラメーターを使用して、現在のユーザーの ID を新しい Microsoft Store ID キーに関連付けることができます (ユーザー ID はキーに埋め込まれます)。 それ以外の場合は、ユーザー ID を Microsoft Store ID キーに関連付ける必要がない場合は、任意の文字列値を渡すことができます。

戻り値

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

正常に完了すると、現在のユーザーの購入 ID キーを返す非同期操作。 このキーは 30 日間有効です。

属性

注釈

アプリ内購入のカタログを持つ発行元は、Microsoft Store 購入 API へのサービス間呼び出しで Microsoft Store ID キーを使用して、現在のユーザーに代わって無料製品のエンタイトルメントを付与できます。 エンタイトルメントは、Microsoft Store を通じて公開されているアプリまたはアドオンを使用する顧客の権利を表します。 詳しくは、「サービスによる製品の権利の管理」をご覧ください。

適用対象

こちらもご覧ください