title: Application access from C# application fails
body: <p>I registred a small application under Azure Portal -> App Registration. I am trying to access with secret key.  </p>
  
  <pre><code>var context = new AuthenticationContext("https://login.windows.net/" + MyConstants.tenantID);
  ClientCredential cc = new ClientCredential(MyConstants.applicationId, MyConstants.authenticationKey);
  AuthenticationResult result = context.AcquireTokenAsync("https://management.azure.com/", cc).Result;
  ServiceClientCredentials cred = new TokenCredentials(result.AccessToken);
  client = new DataFactoryManagementClient(cred)
  {
      SubscriptionId = MyConstants.subscriptionId
  };
  </code></pre>
  
  <p>How to I get the <code>authenticationKey</code>?</p>
  
  <p>I tried using client Secret but it does not work</p>
  
  <pre><code>var context = new AuthenticationContext("https://login.windows.net/" + MyConstants.tenantID);
  ClientCredential cc = new ClientCredential(MyConstants.applicationId, MyConstants.authenticationKey);
  AuthenticationResult result = context.AcquireTokenAsync("https://management.azure.com/", cc).Result;
  ServiceClientCredentials cred = new TokenCredentials(result.AccessToken);
  client = new DataFactoryManagementClient(cred)
  {
      SubscriptionId = MyConstants.subscriptionId
  };
  </code></pre>
  
  <blockquote>
    <p>"Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS700016: Application with identifier '270d74fc-4085-43ff-ab1e-e2dba48461e0' was not found in the directory 'e2454f92-2891-4670-9402-f17f4cef17de'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.</p>
    
    <p>Trace ID: cee6d534-7d75-4fcb-a5e9-0d93ab88af00\r\nCorrelation ID: 3b74b95e-a33a-410d-9e4e-82eef4a81817
    Timestamp: 2019-11-11 10:51:43Z ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: Response status code does not indicate success: 400 (BadRequest)</p>
  </blockquote>