title: How to register new applications in Azure Active Directory programmatically
body: <p>Right now this is how I register a new App in Azure Active Directory.</p>
  
  <ol>
  <li>Go to the Azure Portal</li>
  <li>Go to <strong>Azure Active Directory</strong></li>
  <li>Click on <strong>App registrations</strong></li>
  <li>Click on <strong>Add</strong></li>
  <li>Select a <strong>Name</strong>, <strong>Application Type</strong> and <strong>Sign-on URL</strong></li>
  <li>Set the <strong>Required Permissions</strong></li>
  <li>Set a <strong>Key</strong></li>
  </ol>
  
  <p>Is there a way that I could do this programmatically? What I am looking for is to do above steps and then return the ApplicationId and the Key (or secret).</p>
  
  <p><strong>Background</strong>
  I have a Web Application with a form that receives an Application name and I want in the Controller of the web app do all the logic. Lastly the controller should return the AppId and Secret generated.</p>