An API that connects multiple Microsoft services, enabling data access and automation across platforms
Unfortunately, there is no API (or PowerShell cmdlet) to get this info currently. For all intents and purposes, licenses are equivalent regardless of the purchase method. Microsoft can of course differentiate between them, but the corresponding APIs are not exposed externally.