I Multiply Happiness by Sharing!

How to generate bearer token value for Azure REST API headers without AzureRm.Profile?

I was doing Azure REST API demo at my work place where a good ask popped up “Why Get-AzureRMContext cmdlet to generate bearer token?” We need to fall back with ARM module to work with REST based codes, right?

Yes, if we look at this solution – ARM module is prerequisite! And REST API can be called using the token generated by this function.