Forum Discussion
lizyjeywin
May 05, 2025Copper Contributor
Unable to trigger function app while using managed identity for the storage account connection
I am trying to create an Azure Function of BlobTrigger type, which needs to be triggered on dropping files in the storage account say filessa. Due to policy restriction the storage account cannot use shared access key.
I am unable to trigger the function app dropping a file into a container. I see intermittently an error in the function app logs No valid combination of account information found.
assembly : Azure.Storage.Blobs, Version=12.23.0.0, Culture=neutral, PublicKeyToken=9279e12e44c8
method : Azure.Storage.StorageConnectionString+<>c.<Parse>b__67_0
outerType : Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexingException
outerMessage: Error indexing method 'Functions.SPAREventGridBlobTrigger'
innermostMessage: No valid combination of account information found.
I am referring to Configuring Azure Blob Trigger Identity Based Connection and have created the environment settings and assigned required roles to storage accounts (function App's storage account, say fnsa and the storage account which is used to upload the file to trigger the function app, filessa) as mentioned in this article.
This is my simple code
[Function(nameof(SPAREventGridBlobTrigger))]
public async Task Run([BlobTrigger("samples-workitems/{name}", Source = BlobTriggerSource.EventGrid, Connection = "filessa_STORAGE")] Stream stream, string name)
{
using var blobStreamReader = new StreamReader(stream);
var content = await blobStreamReader.ReadToEndAsync();
Console.WriteLine("Hello from Jey Jey Jey");
_logger.LogInformation($"C# Blob Trigger (using Event Grid) processed blob\n Name: {name} \n Data: {content}");
}
I have assigned roles to the storage account filessa Storage Blob Data Owner and Storage Queue Data Contributor for the Azure Function identity.
and assigned roles to the storage account fnsa Storage Blob Data Contributor for the Azure Function identity.
(Actually I ended up adding many other roles like Storage Account Contributor, Storage Blob Data Reader and similar too to both storage accounts)
Please advice me to on the items to be added in the environment settings.
1. the name and value of the connection of the storage account, filessa
2. the name and value of the connection of the storage account, fnsa
3. other items that needs to be mandatorily added to make it work
I have tried added items like
AzureWebJobsStorage, AzureWebJobsStorage__accountName, AzureWebJobsStorage__blobServiceUri, ...,
AzureWebJobsfilessa_STORAGE, filessa_STORAGE.
I have also referred to this microsoft documentation https://learn.microsoft.com/en-us/azure/azure-functions/functions-event-grid-blob-trigger?pivots=programming-language-csharp ; tried adding the EventSubscription in the storage account filessa.
The webhook https://FA-SPAREG-FA.azurewebsites.net/runtime/webhooks/blobs?functionName=Host.Functions.SPAREventGridBlobTrigger&code=_MPRFuo9sdEg== in Postman with POST returned back error
Please help me with all the required environment settings to be added in the function app in Azure
and any other suggestion or steps I have missed here to make this work.
2 Replies
- AmezingtechsataraIron Contributor
Kidd's settings are the right ones — but the piece that decides whether they get read at all is the Connection value on your trigger, and that's where I'd look first.
The runtime picks the storage account in a strict order: the Connection property on your BlobTrigger attribute first, then a StorageAccount attribute, and only then the function app's default AzureWebJobsStorage. So open the attribute and read what Connection is actually set to — everything else hangs off that name. If it's missing entirely, the trigger is watching your function app's own storage account (fnsa), not filessa, and no file you drop in filessa will ever fire it. And the error you're seeing, 'No valid combination of account information found', is the runtime telling you at indexing time that whatever name the trigger points at has no usable settings behind it — which fits with the scatter of names you tried. The settings group has to match the Connection name exactly: if Connection is filessa_STORAGE, then filessa_STORAGE__accountName and friends are what get read, and a setting called AzureWebJobsfilessa_STORAGE is just ignored.
Once indexing succeeds, there's a second thing to check before you test again. With Source set to EventGrid, the extension creates an Event Grid subscription on filessa that calls back to that webhook address you quoted. Go to filessa in the portal, open Events, and confirm the subscription is actually there. If it isn't, the function app's identity needs the rights to create one on that storage account, or it has to be created by hand — otherwise the trigger will index cleanly and still never fire.
And one small thing on the identity itself: if it's a user-assigned managed identity rather than the system-assigned one, the connection group also needs the credential and client ID settings alongside the account name; with a system-assigned identity the account name alone is enough.
Please cross check below:
1. For filessa (your blob-trigger storage account):
- filessa_STORAGE__accountName = filessa
- filessa_STORAGE__blobServiceUri = https://filessa.blob.core.windows.net
- filessa_STORAGE__queueServiceUri = https://filessa.queue.core.windows.net
2. For fnsa (your function app's storage account):
- AzureWebJobsStorage__accountName = fnsa
- AzureWebJobsStorage__blobServiceUri = https://fnsa.blob.core.windows.net
- AzureWebJobsStorage__queueServiceUri = https://fnsa.queue.core.windows.net
3. Make sure MI is enabled