title: How to get user token silently for Azure DevOps and use it for accessing DevOps REST APIs?
body: <p><strong>Problem Statement:</strong>
  I'm trying to create a module in C# console application that I intend to plug and use in Azure Bot once it is operational. I want to connect my bot with Azure DevOps. I am able to do that with PAT token but I need the bot to only display the resources from DevOps on which the logged in user has access. </p>
  
  <p><strong>Attempts:</strong></p>
  
  <ul>
  <li>I am able to get the necessary details using PAT token. It gives me all projects irrespective of the logged in user details. </li>
  <li>I have tried to use the Azure AD token for the logged in user but it gives me unauthorized error on trying to use it to invoke Azure DevOps REST APIs</li>
  <li>Referred <a href="https://stackoverflow.com/questions/56527208/access-azure-devops-rest-api-with-oauth">this</a> article but I am unable to get the auth code or token silently. </li>
  </ul>
  
  <p>To summarize, I'm basically looking to:</p>
  
  <ul>
  <li>Obtain a user token for Azure DevOps silently (without user confirming with a click)</li>
  <li>Use REST APIs to fetch details like projects, work items etc.</li>
  </ul>