I am trying to connect to different Azure services from my C# code which uses .NET Framework 4.7.2 on-premise application. Is there a way to do Azure AD authentication from within my C# code to connect to an Azure File Share for instance? (https://azurestorageaccount.file.core.windows.net/afs/test.txt).
CodePudding user response:
AFAIK it is not possible to connect to your File Share Service using Azure AD i.e; managed identity at least with azure SDK version 12.8.0 as you can check constructor options available for ShareServiceClient are limited to that.Currently, you can only use the access key to connect your azure file.
You acn use (SAS)Shared Access Signature, or Storage Account Name/Key or specify Storage Account connection string to connect to your File Service.
Azure Files supports identity-based authentication over Server Message Block (SMB) through on-premises Active Directory Domain Services (AD DS) and Azure Active Directory Domain Services (Azure AD DS) . See how to Enable Azure Active Directory Domain Services authentication on Azure Files in portal.
You can check some Faq regarding azure ad here
You can raise a feature request over here.
References: