![]() ![]() ![]() $tenantId = az functionapp identity show -n $functionAppName -g $resourceGroup -query tenantId -o tsv The response will include the principalId and tenantId, and we can get hold of them later if we need to with the following commands: $principalId = az functionapp identity show -n $functionAppName -g $resourceGroup -query principalId -o tsv az functionapp identity assign -n $functionAppName -g $resourceGroup We can use the az functionapp identity assign command to create a "system assigned" managed identity for this Function App. $rand = Get-Random -Minimum 10000 -Maximum 99999 ![]() # create a resource groupĪz group create -n $resourceGroup -l $location I covered this in more detail yesterday, but here's the basic Azure CLI commands to provision a new Function App running on the consumption plan. The first step is to create our Function App, for which we need a Resource Group, a Storage Account, and an App Service Plan. Today, I want to build on that and show how we can use the Azure CLI to add a "Managed Service Identity" (apparently now known simply as "Managed Identity") to a Function App, and then use that identity to grant our Function App access to a secret stored in Azure Key Vault.Īnd again I'll show you how the entire thing can be automated with the Azure CLI. Yesterday, I showed how we can deploy Azure Functions with the Azure CLI. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |