title: "Failed to acquire token silently. Call method AcquireToken"
body: <pre><code>try
  {
      ClientCredential clientCredential = new ClientCredential("***********","**************");
      UserIdentifier userIdentifier = new UserIdentifier(userObjectId, UserIdentifierType.UniqueId);
  
      DiscoveryClient discClient = new DiscoveryClient(SettingsHelper.DiscoveryServiceEndpointUri,
          async () =&gt;
          {
              var authResult = await authContext.AcquireTokenSilentAsync(SettingsHelper.DiscoveryServiceResourceId,
                                                                         clientCredential, userIdentifier);
  
              return authResult.AccessToken;
          });
  
      var dcr = await discClient.DiscoverCapabilityAsync(capabilityName);
  
      return new OutlookServicesClient(dcr.ServiceEndpointUri,
          async () =&gt;
          {
              var authResult = await authContext.AcquireTokenSilentAsync(dcr.ServiceResourceId, clientCredential, userIdentifier);
              return authResult.AccessToken;
          });
  }
  catch (AdalException exception)
  {
      //Handle token acquisition failure
      if (exception.ErrorCode == AdalError.FailedToAcquireTokenSilently)
      {
          authContext.TokenCache.Clear();
          throw exception;
      }
      return null;
  }
  </code></pre>
  
  <p>giving error "Failed to acquire token silently. Call method AcquireToken"</p>