I am trying to create an Azure Function in C# that regenerates storage keys. I'm struggling with finding the correct .NET library where I can authenticate and regenerate the keys.
The easiest way that I have found to authenticate is by using the DefaultAzureCredentials and passing these to BlobClient. But I can't find the option to regenerate keys anywhere on BlobClient.
The only way I found to regenerate keys on a storage account is by using Microsoft.Azure.Management.Fluent but the Fluent API does not support DefaultAzureCredentials. Instead I think I need to use SdkContext.AzureCredentialsFactory which doesn't have the automated fallback on Managed Identity and VS Code that DefaultCredentials has.
- Is there some way to regenerate keys with
BlobClientso I can useDefaultAzureCredentials? - Or is there a way to use
DefaultAzureCredentialswith the Fluent API?