Question

Difficulty: HardCreate and Configure Azure Functions

An organization is migrating an existing Azure Function App (V4 runtime) to meet security compliance guidelines that forbid storing connection strings in application settings. You must configure the Function App to use an identity-based connection for its default host storage account (AzureWebJobsStorageAzureWebJobsStorage) using a system-assigned managed identity.

Which of the following actions must you perform? (Select TWO)

  1. Add an application setting named AzureWebJobsStorage__accountName and set its value to the name of the storage account.Answer
  2. Assign the Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles to the system-assigned managed identity on the storage account.Answer
  3. C
    Add an application setting named AzureWebJobsStorageAzureWebJobsStorage and set its value to ManagedIdentity.
  4. D
    Assign only the Storage Blob Data Contributor role to the system-assigned managed identity on the storage account.

Answer

To configure the Function App to use an identity-based connection for AzureWebJobsStorageAzureWebJobsStorage, you must add the application setting AzureWebJobsStorage__accountName with the storage account name as its value, and assign the Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles to the system-assigned managed identity on the storage account.
The correct options are the actions to add the AzureWebJobsStorage__accountName application setting and to assign the Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles to the system-assigned managed identity. The AzureWebJobsStorage__accountName setting signals to the Azure Functions runtime that it should connect to the storage account using the managed identity. The specific RBAC roles are required because the Azure Functions host runtime needs blob owner privileges for lease management, and queue/table permissions for host execution and key management.

Step-by-Step Solution

1
Enable system-assigned managed identity on the Function App.
The Function App is registered with Microsoft Entra ID and has an identity principal created.
An identity is required to authorize the Function App to access the storage account without connection strings.
2
Configure the Azure WebJobs host storage application setting.
Replace the connection string-based setting with AzureWebJobsStorage__accountName.
This setting instructs the V4 Functions runtime to connect to the designated storage account using the managed identity.
3
Assign the necessary RBAC roles to the Function App's identity on the storage account.
The identity is granted Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles.
The Functions host requires Blob Owner permissions for managing blob container leases, and Queue/Table contributor roles for managing tasks and function keys.

Key Concept

Configuring identity-based connections for Azure Functions host storage
Rate this question