I’m developing my first Metro app using XAML. The app is for our company intranet use only. I have these questions –
- Is it possible to retrieve the account name (domain\username) of the current logged in user? Do I need to use a WinRT component for this? I looked up
Windows.Security.Authenticationnamespace and onlyWebandOnlineIdare available. - I’m using the WebView control to navigate to a secure URL. If I open this URL in a browser, I do not get any prompts (since my machine is joined to the domain), but if I open the URL in a WebView, I get the username & password prompt. Is there a way to get rid of it?
Update – I was able to solve #2 question by enabling Enterprise Authentication in the Capabilities tab of the Package.appxmanifest file.
For No. 1:
Please use Windows.System.UserProfile.UserInformation class to get all relevant information
e.g. to get the display name