I already tried the folowing:
IReadOnlyList<User> users = await User.FindAllAsync();
var current = users
.Where( p =>
p.AuthenticationStatus == UserAuthenticationStatus.LocallyAuthenticated &&
p.Type == UserType.LocalUser
)
.FirstOrDefault();
string dominio = (string) await current.GetPropertyAsync( KnownUserProperties.DomainName ); // cause an error
Not worked: "A method was called at an unexpected time"
How do I get the domain name or domainname\username?