Code generation for oauth2 bearer token requests

Postman has a great feature: click the Code icon to have postman auto-generate runnable code in any programming language you want for a given request. But I cannot find how to do this for an oauth2 authorization request. Having code generated for this would be highly useful, because oauth2 requests to obtain bearer tokens from a Microsoft Azure vault are a bit complex.

How is it done?

Any help would be much appreciated.