tabs-not-spaces / powers-hell-blog

new home for powers-hell.com blog
The Unlicense
4 stars 0 forks source link

Authenticate to Graph in Azure Functions with Managed Identites (Part 1) | Powers Hell #192

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Authenticate to Graph in Azure Functions with Managed Identites (Part 1) | Powers Hell

When creating Azure Functions, there has always been a way to create and use “managed identities” to securely and simply access resources within the resource group that the function app resides. With a little bit of PowerShell and a basic understanding of how API permissions are programmatically applied, we can use the managed identity to access Graph without needing to store credentials anywhere! Secure AND cool, right?

https://powers-hell.com/2022/09/12/authenticate-to-graph-in-azure-functions-with-managed-identites/

vandre commented 1 year ago

This was very helpful.. Would you happen to know what is the resource URI that I need to use to get an access token to query Microsoft Graph within an Azure Function?

The Microsoft documentation just states: $resourceURI = "https://"

Source: https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=ps%2Cpowershell#rest-endpoint-reference