title: Connect to Azure AD using username/password
body: <p>I have an Azure Api REST which can be reach by entering  a username/password .
  how can i get access to this API from C#  ?</p>
  
  <p>after a little search , i found somthing about using <strong>AuthenticationContext</strong> .. but it couldn't work for me   Authenticationcontext .AcquireToken(resource, clientId, credential);</p>
  
  <p>where can i get the '<strong>resource</strong>' parameter  and the <strong>ClientID</strong> . </p>
  
  <p>Thanks a lot</p>