On our company network windows user names are like DomainXXU12312, however our windows accounts have actual names and surnames attached to them.
In my previous .Net Framework4.6 projects I could use System.DirectoryServies.AccountManagement as in the answer below:
Get Windows User Display Name
However when converting to .NET7-windows and adding System.DirectoryServices.AccountManagement(8.0.0, which should be compatible), then every single property is throwing a PlatformNotSupportedException.
What could an alternative route be to obtain actual windows first name and surname?
I’ve read other replies that updating System.DirectoryServies.AccountManagement to match target framework and also make sure that target framework has the -windows suffix <TargetFramework>net7.0-windows</TargetFramework>
however this is not solving anything