Access APIs secured with Azure Active Directory with Azure FunctionsOn 2 minutes
Azure functions can be granted two types of identities:
- A system-assigned identity is tied to your application and is deleted if your app is deleted. An app can only have one system-assigned identity.
- A user-assigned identity is a standalone Azure resource that can be assigned to your app. An app can have multiple user-assigned identities.
To set up a managed identity in the portal,
- Navigate to Platform features. For other app types, scroll down to the Settings group in the left navigation.
- Select Identity.
An app can use its managed identity to get tokens to access other resources protected by Azure AD. These tokens represent the application accessing the resource, and not any specific user of the application.
There is a simple REST protocol for obtaining a token in App Service and Azure Functions. For more on accessing and using the tokens, read from Microsoft docs here.