title: How to grant admin consent to an Azure AAD app in Powershell?
body: <p>I'm trying to authenticate an Azure Web App using Azure Active directory.
  I have taken the following steps, so far:</p>
  <p>1- Through Azure portal, I have created an app registration in AAD, and assigned it to the web app following the instructions from <a href="https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad#-configure-with-express-settings" rel="nofollow noreferrer">here</a>.</p>
  <p>2- I assigned some users to my app using <code>New-AzureADGroupAppRoleAssignment cmdlet</code>, and then set user assignment as a requirement, using <code>set-AzureADServicePrincipal -AppRoleAssignmentRequired $true</code></p>
  <p>This works as expected: the users who are not assigned to the app, see an &quot;access denied&quot; page, and the ones who are, see a prompt page for &quot;Admin consent&quot;.</p>
  <p>The problem is there is no links in the admin consent prompt for them to request it.
  I tried to follow the instructions from <a href="https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/grant-admin-consent" rel="nofollow noreferrer">here</a>, but I don't have access to the AAD through the portal. I can only do this through Powershell.</p>
  <p>If you know of the Powershell cmdlet for setting this link (or to change the admin consent to user consent), I would be grateful if you could post it here.</p>