Logic App Standard扩展包不支持MSI连接存储账户排查咨询
The error Microsoft.WindowsAzure.Storage: Value cannot be null. (Parameter 'connectionString') occurs because your 1.x extension bundle doesn't support MSI authentication for the core AzureWebJobsStorage connection. Here are step-by-step troubleshooting directions:
1. Upgrade Extension Bundle to 2.x or Later
The 1.x Microsoft.Azure.Functions.ExtensionBundle.Workflows bundle doesn't support MSI for AzureWebJobsStorage. Update your host.json to use a 2.x version range:
{ "version": "2.0", "logging": { "applicationInsights": { "samplingSettings": { "isEnabled": true, "excludedTypes": "Request" } } }, "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", "version": "[2.*, 3.0.0)" } }
- Ensure your Function App uses .NET 6 runtime (required for 2.x bundles): Go to Azure Portal > Function App > Configuration > General settings > Runtime version, set to
~4(maps to .NET 6).
2. Confirm MSI Permissions on Storage Account
Your Logic App's managed identity needs sufficient permissions to access the storage account:
- Assign either Storage Account Contributor or Storage Blob Data Contributor role to the identity (system or user-assigned).
- Navigate to your Storage Account > Access control (IAM) > Add role assignment > Select the role > Search for your Logic App's identity and assign it.
3. Configure Correct Application Settings
Use the right app setting format for MSI authentication:
- System-assigned MSI: Keep
AzureWebJobsStorage__accountName=your-storage-account-name(this works with 2.x bundles). - User-assigned MSI: Add an additional setting:
AzureWebJobsStorage__clientId=your-msi-client-id. - Remove any existing
AzureWebJobsStoragesetting that contains a full connection string (it will override the MSI configuration).
4. Validate Runtime and Bundle Compatibility
- Confirm your Function App runs on Functions runtime version ~4 (compatible with 2.x extension bundles).
- Check that the extension bundle is successfully installed post-deployment: Go to Function App > Extensions > Verify the bundle version falls in the 2.x range.
5. Audit Workflow Connections
Even if AzureWebJobsStorage is fixed, some workflow triggers/actions might still use key-based storage connections:
- Open each workflow in Azure Portal.
- For any storage-related connectors, confirm they're configured to use MSI instead of access keys.
内容的提问来源于stack exchange,提问作者JCallico

