How to get logged in user name in ADFS3.0 ?


when log in adfs server 3.0. how user name has log in ? want pass user name api. please me.

have tried using current thread's principal? win app current thread's user ad user. principal windows account user name.

there couple of different ways information , may not consistent cases (such impersonation , services).

  1. environment.username
  2. windowsidentity.getcurrent.name
  3. thread.currentprincipal (iprincipal)
  4. (for web apps , in context of controller or page) this.user (iprincipal)

for iprincipal use identity property iidentity has user name in name property. note iprincipal may not windows principal, depending upon how app configured win apps be.

michael taylor
http://www.michaeltaylorp3.net



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'