Simple javascript/nodejs function to get a access (bearer) token for programatic Azure API calls.
Clone repo and create as an Azure Function (vs code makes this easy).
In Postman or your custom code, simply make a POST request to the azure function endpoint. Ensure you're passing a JSON object with the following properties:
- client_id
- client_secret
- tenant_id
- resource [ex: 'https://graph.microsoft.com/.default' or 'https://management.azure.com/']
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.