Share via


CurrentApp.GetCustomerCollectionsIdAsync(String, String) 方法

定義

擷取 Microsoft Store 識別碼金鑰,可用來查詢產品權利,或取用目前使用者所擁有的產品權利。

public:
 static IAsyncOperation<Platform::String ^> ^ GetCustomerCollectionsIdAsync(Platform::String ^ serviceTicket, Platform::String ^ publisherUserId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<winrt::hstring> GetCustomerCollectionsIdAsync(winrt::hstring const& serviceTicket, winrt::hstring const& publisherUserId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<string> GetCustomerCollectionsIdAsync(string serviceTicket, string publisherUserId);
function getCustomerCollectionsIdAsync(serviceTicket, publisherUserId)
Public Shared Function GetCustomerCollectionsIdAsync (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

匿名識別碼,識別您管理為目前應用程式發行者之服務內容中的目前使用者。 如果您在服務的內容中維護使用者識別碼,您可以使用此參數將目前使用者的識別碼與新的 Microsoft Store 識別碼金鑰產生關聯, (使用者識別碼將會內嵌在金鑰) 。 否則,如果您不需要將使用者識別碼與 Microsoft Store 識別碼金鑰產生關聯,您可以傳遞任何字串值。

傳回

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

目前使用者的集合識別碼索引鍵。 此金鑰有效期限為 30 天。

屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10586.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v2.0 引進)

備註

具有應用程式內購買目錄的發行者可以使用 Windows 市集集合 API 的服務對服務呼叫中的 Microsoft Store 識別碼金鑰來查詢產品權利,或取用目前使用者所擁有的產品權利。 權利代表客戶使用應用程式或應用程式內產品的權利, (透過 Windows 市集發佈的 IAP) 。 如需詳細資訊,請查看管理服務的產品權利

適用於

另請參閱