Thanks, I have looked at this. Unfortunately, for LogonDomain, this utility does not report the same information as the BGInfo utility by Sysinternals. When the user is logged in using a Microsoft account, this utility reports the workstation name and not "MicrosoftAccount" as the Sysinternals utility reports. It does not differentiate between a local account and a Microsoft account.

All I am really looking for is to know whether the user logged on using a "MicrosoftAccount", "AzureAd" or normal Windows Domain AD account. Perhaps the approach I am taking is not best idea. Perhaps there is a completely different way of determining this. Anyone have any ideas?