Basic script to test authentication using an app registration to retrieve the last message in an inbox using Graph API. Note these are targeting the GCC-High (Government) endpoints. Basic.
The use of the APPLICATIONINSIGHTS_CONNECTION_STRING in Azure Functions is now built into the runtime. Note my examples are for Azure US Government cloud but this can ultimately be used.