I've defined this function:
[FunctionName("My_QueueTrigger")]
public Task RunAsync([QueueTrigger("my-queue-name", Connection = "AzureWebJobsStorage")] string text)
{
// code here...
}
And the AzureWebJobsStorage
(on Azure) contains the following: "DefaultEndpointsProtocol=https;AccountName=my-storage-account;AccountKey=mykey;EndpointSuffix=core.windows.net"
(Note that for local development, the value is "UseDevelopmentStorage=true"
.)
My question is of it's also possible to just define the Storage Account name here like "https://my-storage-account.queue.core.windows.net"
and use the Managed Identity (which has Processor permissions) from the Azure Function to read/trigger on messages.
I think your requirement is impossible.
The underlying code connected to the Storage has been encapsulated in the WebJob package, which is included as a member package in the expansion package of the entire function. You have to modify the underlying code to achieve the functions you want.
Check the source code of queuetrigger attribute:
You can find the source code, it tells us we need to give the connection string instead of the storage url.
Download the source code of webjobs package, and check the source code of queuetrigger, you will find that the source code does not implement that you want. You cannot tell the function that you want to use MSI, and it does not provide you with any way to use this feature.
In short, source code cannot realize your ideas. Unless you modify the underlying implementation of the source code, recompile and import the package, it is impossible.