title: How to set Redirect URI for Spring Boot App on App Service using Azure AD
body: <p>I followed the below tutorial to deploy a Spring Boot web application locally that uses Azure AD:</p>
  
  <p><a href="https://dev.to/azure/using-spring-security-with-azure-active-directory-mga" rel="nofollow noreferrer">https://dev.to/azure/using-spring-security-with-azure-active-directory-mga</a></p>
  
  <p>This works well locally,and I have deployed the application to Azure App Service. To redirect correctly for Oauth I am configuring the Redirect URI on App Service, the Azure GUI expects an OAuth Redirect URI that begins with "https://" and Spring boot expects a redirect URI with the format "<a href="http://[domain]:[port]/login/oauth2/code/azure" rel="nofollow noreferrer">http://[domain]:[port]/login/oauth2/code/azure</a>".</p>
  
  <p>Is there a way to configure Spring to expect a URI beginning with "https://"</p>
  
  <p>I tried updating the below application property which didn't help. There is workaround to use Type=Public client/native with an "http" URI. Is there a better solution?</p>
  
  <blockquote>
    <p>spring.security.oauth2.client.registration.azure.redirect-uri-template={baseUrl}/login/oauth2/code/{registrationId}</p>
  </blockquote>