Thank you for your feedback. We’re considering this for a future release of Azure Search.
Azure Search Product TeamLucas commented
search for CosmosDB graph API
Bytecode support for Gremlin API is scheduled for public preview, December 2019.
This is currently not on our roadmap. You can retrieve this value by making a call through the Graph API. If this is needed for your scenarios, please continue voting and we will review at a later date.Lucas commented
This is such an obvious feature, can you please add ASAP! When you authenticate with a username you should have access to that value in the token!