I develop VSTO add-in for Word, Excel etc. And I need to get information about user currently logged in Office application. I need at least an email address.
I found these properties Globals.ThisAddIn.Application.UserName, .UserInitials and .UserAddress. But it's not about LiveID account. It is about office user settings.
How can I get required information?

I found only one way to retrieve this information - read the Registry... There are key
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\Identity\Identities\if it is Office 2016. There are subkey likexxxxx_LiveIdwherexxxxxmatches toProviderIdvalue.You can read at least
EmailAddressvalue from that subkey.So I wrote some C# code for retrieve an e-mail address of logged in LiveID user:
Of cource you shouldn't hardcode
Versionvalue. You can get and remember office version fromGlobals.ThisAddIn.Application.VersioninThisAddIn.csfile inThisAddIn_Startupmethod.