Hello @AJITH KUMAR RAI
To use managed identity instead of StorageConnectionString
, you can use the following code:
public void Run([BlobTrigger("samples-workitems/{name}", Connection = "AzureWebJobsStorage")] Stream myBlob, string name, ILogger log) { }
Here, you can replace the Connection
parameter with the name of the app setting that contains the connection string for your storage account. You can use the app setting AzureWebJobsStorage
to specify the storage account name and use managed identity to authenticate. Regarding the app setting WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
, you can use managed identity to authenticate by setting the value of this app setting to the connection string of your storage account that includes the ResourceId
parameter.
Here is an example of how to set the value of this app setting: DefaultEndpointsProtocol=https;AccountName=;EndpointSuffix=core.windows.net;ResourceId=/subscriptions/{YOUR-SUBSCRIPTION-ID}/resourceGroups/{YOUR-RESOURCE-GROUP-NAME}/providers/Microsoft.Storage/storageAccounts/{YOUR-ACCOUNT-NAME}
I hope this helps.