Skip to content

How to get properties of the "current user"? #1743

@twhall-umich

Description

@twhall-umich

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.

Metadata

Metadata

Labels

Pri2Topic is in the second 25% of page views for the repo.doc-bugTopic has missing, outdated, unclear, confusing info, or has broken functionality.uwp/prodTopic product is UWP-related.winrt-reference/techTopic technology is WinRT-related.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions