Ejemplo n.º 1
0
        private DataLakeFileSystemClient GetClient(DataLakeFunctionsServicePrincipalConnectionConfig connectionConfig)
        {
            // This works as long as the account accessing (managed identity or visual studio user) has both of the following IAM permissions on the storage account:
            // - Reader
            // - Storage Blob Data Reader
            //
            // Note: The SharedTokenCacheCredential type is excluded as it seems to give auth errors
            var cred = AzureIdentityHelper.GetDefaultAzureCredential();

            _logger.LogInformation($"Using credential Type: {cred.GetType().Name}");

            return(new DataLakeFileSystemClient(new Uri(connectionConfig.BaseUrl), cred));
        }