共用方式為


StoreContext.GetCustomerCollectionsIdAsync(String, String) 方法

定義

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

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

屬性

備註

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

適用於

另請參閱