if i open the cmd and type whoami/logonid
i get back a Logon id number ,
after some research i found this line :
var logonId = UserPrincipal.Current.Sid;
this code gets me a number that starts like the whoami/lgonid but they different.
i dont wish to run the whoami throw c# code i just need to get the result number.
for example :
if i write whoami/user i got the user name, the equivalent in c# code is WindowsIdentity.GetCurrent().Name;
i need the same for logonid