Microsoft Azure Native Azure REST API calls now available in Azure CLI 2.0.67+ I wrote a few PowerShell functions a couple of years ago to build a bearer token out of an active session. I needed to make calls in scripts here and
Microsoft Azure How to easily and silently obtain AccessToken (Bearer) from an existing Azure PowerShell session More than often I need to call the Azure RM REST API to perform a variety of thing. Pretty much the only way you'll find to do it