title: Setting up redirect URI for Azure AD authentication from native app
body: <p>I'm writing a desktop application with C++/WinRT which needs to silently authenticate with Azure AD on a joined machine, using the Web Account Manager API.</p>
  
  <p>Following the recent Microsoft documentation <a href="https://docs.microsoft.com/en-us/samples/azure-samples/active-directory-dotnet-native-uwp-wam/active-directory-dotnet-native-uwp-wam/" rel="nofollow noreferrer">here</a>, I can see that the redirect-uri set in the <code>/oauth2/token</code> request when using this API is something like <code>ms-appx-web://Microsoft.AAD.BrokerPlugin/{id}</code>.</p>
  
  <p>When I try to set this redirect URI in the App Registrations page of my Azure AD application, I get an error saying that only HTTPS schemes are allowed. The (also recent) Azure AD documentation <a href="https://docs.microsoft.com/en-gb/azure/active-directory/develop/reply-url" rel="nofollow noreferrer">here</a> states that (emphasis mine):</p>
  
  <blockquote>
    <p>The new App registrations experience doesn't allow developers to add URIs with HTTP scheme on the UI. <strong>Adding HTTP URIs for apps that sign in work or school accounts is supported only through the app manifest editor. Going forward, new apps won't be able to use HTTP schemes in the redirect URI.</strong> However, older apps that contain HTTP schemes in redirect URIs will continue to work. Developers must use HTTPS schemes in the redirect URIs.</p>
  </blockquote>
  
  <p>Does this mean that new apps won't be able to use non-HTTPS schemes in the redirect URI <strong>even when using the app manifest editor</strong>? Is this the correct way of setting up a native application for authentication with Azure AD?</p>
  
  <p>It does seem like I don't really require a redirect-uri since this is a native application; I only need the token! It seems like there is the MSAL library for doing "Integrated Windows Authentication" (as documented <a href="https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Integrated-Windows-Authentication" rel="nofollow noreferrer">here</a>), but the API seems to be .NET only which unfortunately is not an option.</p>