Tyring to use the below docs to get this up and running for my console app that I plan to port to Azure Functions. https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-net-sdk
The code below is where I'm getting stuck
CODE SNIP
// Service principal / appplication authentication with client secret / key
// Use the client ID of an existing AAD "Web App" application.
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
var domain = "<AAD-directory-domain>";
var webApp_clientId = "<AAD-application-clientid>";
var clientSecret = "<AAD-application-client-secret>";
var clientCredential = new ClientCredential(webApp_clientId, clientSecret);
var creds = await ApplicationTokenProvider.LoginSilentAsync(domain, clientCredential);
MY IMPLEMENTATION
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
var domain = "https://microsoft.onmicrosoft.com";
var webApp_clientId = "<my-client-id>";
var clientSecret = "<my-client-secret>";
var clientCredential = new ClientCredential(webApp_clientId, clientSecret);
var creds = await ApplicationTokenProvider.LoginSilentAsync(domain, clientCredential);
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
_adlsClient = new DataLakeStoreAccountManagementClient(creds) { SubscriptionId = _subId };
_adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(creds);
await _adlsFileSystemClient.FileSystem.MkdirsAsync("<name-of-my-dlstore>", "tempdir");
I also made sure to give my app permissions to my specified folder in Azure Data Lake instance:
I also made sure to give all child folders in this directory the same level or permissions:
Assigned permissions to file path
When I run my implementation I get the below errors. Any advice SO? System.AggregateException: 'One or more errors occurred.'
Inner Exception 1
AdalServiceException: AADSTS90002: Requested tenant identifier 'https:' is not valid.
Trace ID: d1718b0a-0533-4708-a311-4e1622840100
Correlation ID: a1544df2-692e-43d2-8acf-25a847956fb6
Timestamp: 2017-03-29 01:30:18Z
Inner Exception 2
WebException: The remote server returned an error: (400) Bad Request.
AS PART OF SOLUTION Need to make sure to give root folder read, write, execute permissions, (this will trickle down to the one folder you want to give these permissions for) then remove those permissions from all other folders you don't want these permissions assigned too, making sure you select the option to remove these permissions for that sub folder and all it's kiddos/children.