简体   繁体   English

UWP从用户登录的Microsoft Store帐户获取唯一ID

[英]UWP Get unique id from user logged microsoft store account

I need unique id to save user purchases to my database. 我需要唯一的ID,才能将用户购买的商品保存到我的数据库中。 i dont need device id because if user change microsoft store account then device id will be same to previus. 我不需要设备ID,因为如果用户更改了Microsoft商店帐户,则设备ID将与上一个相同。

I want to a leaderboard to most users purchases but i dont know him id if user change own device . 我想为大多数用户购买的排行榜,但是如果用户更改自己的设备,我不知道他的ID。

The best you could do would be to have their app call StoreContext.GetUserCollectionsAsync from the UWP app on the user machine, then forward these results to your services. 最好的办法是从用户计算机上的UWP应用程序让其应用程序调用StoreContext.GetUserCollectionsAsync ,然后将这些结果转发到您的服务。 This isn't really all the purchase, but is all the things the user currently owns. 这实际上并不是全部购买,而是用户当前拥有的所有东西。

Or, using your UWP app again, just keep track of it immediately after the purchase succeeded. 或者,再次使用您的UWP应用,只需在购买成功后立即对其进行跟踪。 But I don't think there is any way to look up their purchase history directly. 但是我认为没有任何方法可以直接查询他们的购买记录。

A more complicated solution would be to use the B2B APIs. 一个更复杂的解决方案是使用B2B API。 This would allow them to query the collections service directly from their service. 这将允许他们直接从其服务中查询集合服务。 This is probably the closest to what you are wanting. 这可能是您想要的最接近的。 The token that get back would be unique to the user (not device). 取回的令牌对于用户(而非设备)而言是唯一的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取UWP App中当前登录用户的用户名/用户ID - Get The Username/User Id Of Currently Logged In User In A UWP App Microsoft WEB API从Microsoft帐户获取用户信息 - Microsoft WEB API Get User Info From Microsoft Account 如何获取UWP中当前登录用户的用户名? - How to get the username of the current logged in user in UWP? C#Microsoft身份验证从控制器获取登录用户 - C# Microsoft Authentication Get logged user from controller 如何获取UWP App中当前登录用户的用户名或ID - How can I get username or id of currently logged in user in UWP App 从Windows 8桌面应用程序获取Microsoft帐户ID - Get Microsoft Account Id from Windows 8 desktop application 登录用户的ID - Get logged in user's id 从 MailItem (Microsoft.Office.Interop.Outlook) 获取唯一 ID? - Get Unique Id From MailItem (Microsoft.Office.Interop.Outlook)? 如何在 Microsoft Store 中获取唯一用户 ID API - How to get a unique userid in Microsoft Store API 当用户具有链接的Windows / Microsoft帐户时,如何获得类似于Windows Store应用程序的UX进行Live帐户登录的UX? - How can I get a UX similar to the Windows Store app for Live account login when the user has a linked Windows/Microsoft account?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM