public async Task SetGetAclsAsync() { // Make StorageSharedKeyCredential to pass to the serviceClient string storageAccountName = NamespaceStorageAccountName; string storageAccountKey = NamespaceStorageAccountKey; Uri serviceUri = NamespaceBlobUri; StorageSharedKeyCredential sharedKeyCredential = new StorageSharedKeyCredential(storageAccountName, storageAccountKey); // Create DataLakeServiceClient using StorageSharedKeyCredentials DataLakeServiceClient serviceClient = new DataLakeServiceClient(serviceUri, sharedKeyCredential); // Get a reference to a filesystem named "sample-filesystem-aclasync" and then create it DataLakeFileSystemClient filesystem = serviceClient.GetFileSystemClient(Randomize("sample-filesystem-acl")); await filesystem.CreateAsync(); try { // Create a DataLake file so we can set the Access Controls on the files DataLakeFileClient fileClient = filesystem.GetFileClient(Randomize("sample-file")); await fileClient.CreateAsync(); // Set Access Control List await fileClient.SetAccessControlAsync("user::rwx,group::r--,mask::rwx,other::---"); // Get Access Control List PathAccessControl accessControlResponse = await fileClient.GetAccessControlAsync(); // Check Access Control permissions Assert.AreEqual("user::rwx,group::r--,mask::rwx,other::---", accessControlResponse.Acl); } finally { // Clean up after the test when we're finished await filesystem.DeleteAsync(); } }