Hi Team,
We have enabled RBAC access for Cosmos and Blob storage. We have configured the blob storage and cosmos client with the service endpoint and default azure credentials in azure web app and we are able to access the cosmos data and storage tables and blob.
Same configuration we have made in Azure functions. Below is the JSON file,
"AzureWebJobsStorage__blobServiceUri": "https://<account name>.blob.core.windows.net/",
Startup File:
builder.Services.AddSingleton<IStorage>(_ => new BlobsStorage(new Uri($"{Environment.GetEnvironmentVariable("AzureWebJobsStorage__blobServiceUri")}{Environment.GetEnvironmentVariable(<ContainerName>)}"), new DefaultAzureCredential(), new StorageTransferOptions(), new BlobClientOptions()));
While building the code we are getting the below error,
[2024-02-19T16:43:38.310Z] Microsoft.Azure.WebJobs.Script.WebHost: Secret initialization from Blob storage failed due to missing both an Azure Storage connection string and a SAS connection uri. For Blob Storage, please provide at least one of these. If you intend to use files for secrets, add an App Setting key 'AzureWebJobsSecretStorageType' with value 'Files'.
Value cannot be null. (Parameter 'provider')