0

Having an Azure AD user logged in in a Windows Virtual Desktop (WVD) windows-client and a .NET application launched from this WVD, is it possible to read, from the C# code, the authenticated user in WVD (or a Token)?

Maybe an equivalent for System.Security.Principal.WindowsIdentity.GetCurrent()

  • What about `System.Environment.UserName` ? what is the problem with `System.Security.Principal.WindowsIdentity.GetCurrent()` on WVD ? – Selvin Oct 19 '20 at 13:44
  • @Selvin, yes, that's true, but the main goal would be to be able to get a token and the Object ID associated with the Azure user logged in in WVD and further perform the authentication/authorizations for the .Net application running in WVD. I've tried to use PowerShell Get-AzWvdUserSession, but this doesn't return anything, when calling it from the C# code. – csurapid Oct 20 '20 at 11:19

0 Answers0