Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string _username = <your azure username>
- string _pass = <your azure password>
- string _adlsAccountName = <name of your data lake store>
- string _subId = <your subscription id>
- string localFolderPath = @"<yourfolderpath>"
- string localFilePath = Path.Combine(localFolderPath, "<yourFile>");
- string remoteFolderPath = "/path on data lake/";
- string remoteFilePath = Path.Combine(remoteFolderPath, "yourFileonDataLake");
- var tenantId = "<your tenant id>"; //you can find this in right top corner on azure portal
- var nativeClientApp_clientId = "1950a258-227b-4e31-a9cf-717495945fc2"; // you can use this one
- var activeDirectoryClientSettings = ActiveDirectoryClientSettings.UsePromptOnly(nativeClientApp_clientId, new Uri("urn:ietf:wg:oauth:2.0:oob"));
- var creds = UserTokenProvider.LoginSilentAsync(nativeClientApp_clientId, tenantId, _username, _password).Result;
- _adlsClient = new DataLakeStoreAccountManagementClient(creds) { SubscriptionId = _subId };
- _adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(creds);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement