title: How do you use AcquireTokenSilentAsync to authenticate a user?
body: <p>I am attempting to programmatically authorise an Azure application from an Azure AD joined machine.</p>
  
  <p>If I go to the application URL in Internet Explorer it is able to verify the logged on user account.</p>
  
  <p>My current code looks something like this:</p>
  
  <pre>
  using Microsoft.IdentityModel.Clients.ActiveDirectory;
  
  AuthenticationContext context = new AuthenticationContext("https://login.microsoftonline.com/TENANTGUID");
  Uri uri = new Uri("urn:ietf:wg:oauth:2.0:oob");
  var pparams = new PlatformParameters(PromptBehavior.Auto, null);
  AuthenticationResult result = await context.AcquireTokenAsync("https://graph.windows.net", "1950a258-227b-4e31-a9cf-717495945fc2", uri, pparams);
  </pre>
  
  <p>This call is successful but I want to acquire a token for the currently logged on user.</p>
  
  <p>The first two parameters to the <code>AcquireTokenAsync</code> call are <code>resource</code> and <code>clientid</code>.</p>
  
  <p>I can get the Homepage url and application id for the application I want to access but cannot find a combination of the two that works.</p>
  
  <p>What parameters should I pass to this function to silently validate the logged on user and obtain an authorisation header that can be used in subsequent calls to the application?</p>