title: Oauth2 IMAP: How to request consent for 'IMAP.AccessAsUser.All' permission for an app registered in Azure AD
body: <p>I am trying to request consent for 'IMAP.AccessAsUser.All' permission from user, so that my app can access the user's inbox via OAuth2.</p>
  
  <p>But when i request for permission I get the following error. See attached image.</p>
  
  <blockquote>
    <p>The application asked for scope 'IMAP.AccessAsUser.All' that does not exist on resource.</p>
  </blockquote>
  
  <p>Below is the url of the consent link. Could someone help with how I can get consent for this permission 'IMAP.AccessAsUser.All'<a href="https://i.stack.imgur.com/V66V6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V66V6.png" alt="chan"></a></p>
  
  <pre><code>https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
  client_id=b0eb0e00-ec46-4df8-a710-491468ed4f37
  &amp;response_type=code
  &amp;redirect_uri=https%3A%2F%2Fimap.mailboxsync.test.com%2Fredirect%2F
  &amp;response_mode=query
  &amp;scope=openid%20offline_access%20https%3A%2F%2Foutlook.office365.com%2FIMAP.AccessAsUser.All
  &amp;state=12345
  </code></pre>