-1

Is there a way to get all Microsoft accounts and the admin user in them?

  1. Get all local admin user by win32_UserAccount, if it's Microsoft account, we cant get related info, such as email info.

  2. WindowsIdentity.Getcurrent() can get current user, and if it is Microsoft account, it can get email info.

peterh
  • 11,875
  • 18
  • 85
  • 108
  • IReadOnlyList users = await User.FindAllAsync(); [Get UserName in a Windows 10 C# UWP Universal Windows app](http://stackoverflow.com/questions/33394019/get-username-in-a-windows-10-c-sharp-uwp-universal-windows-app) use it, it seems only get one user info. – yongliang sun Jul 28 '16 at 10:04

1 Answers1

0

HKEY_USERS.DEFAULT\Software\Microsoft\IdentityCRL\StoredIdentities The RegistryKey will list the email and local user's sid, you can get local infomation by sid.