-
Notifications
You must be signed in to change notification settings - Fork 514
How to get properties of the "current user"? #1743
Copy link
Copy link
Closed
Labels
Pri2Topic is in the second 25% of page views for the repo.Topic is in the second 25% of page views for the repo.doc-bugTopic has missing, outdated, unclear, confusing info, or has broken functionality.Topic has missing, outdated, unclear, confusing info, or has broken functionality.uwp/prodTopic product is UWP-related.Topic product is UWP-related.winrt-reference/techTopic technology is WinRT-related.Topic technology is WinRT-related.
Metadata
Metadata
Assignees
Labels
Pri2Topic is in the second 25% of page views for the repo.Topic is in the second 25% of page views for the repo.doc-bugTopic has missing, outdated, unclear, confusing info, or has broken functionality.Topic has missing, outdated, unclear, confusing info, or has broken functionality.uwp/prodTopic product is UWP-related.Topic product is UWP-related.winrt-reference/techTopic technology is WinRT-related.Topic technology is WinRT-related.
The documentation says, "pass null into this method, which gets the current user's ID." But there's no documented way to use the returned system ID to obtain the properties of the "current user." I cannot get a User object from this system ID, therefore I cannot get any other properties. In particular, I seek the login ID and display name for the "current user" -- the owner of this process -- for a collaboration feature in our app.
I can get a list of users from System::User::FindAllAsync(...), but how do I determine which of those users is the "current user"? I tried iterating through that vector, calling GetSystemIdForUser(user).id() for each, and comparing with the value returned by GetSystemIdForUser(nullptr).id(), but none of them compared equal.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.