title: Azure AD Redirect URL Using Application Gateway
body: <p>We have an ASP Core 2.0 App working nicely with Azure AD on the private network. However, we've been playing around with the Azure Application Gateway, investigating the possibility of allowing access to the app from outside for remote workers etc.</p>
  
  <p>We have registered the app on the Gateway, and, once logged in with Azure AD, the anonymous front page is accessible via <code>ourapp.msappproxy.net</code>. However, when signing in (again?) in the app, the client is redirected back to <code>intervalServer/signin-oidc</code> which fails as it is not accessible externally.</p>
  
  <p>While I doubt this is any part of the solution, I have tried overriding the redirect <code>"CallbackPath": "/signin-oidc",</code>  to absolute path <code>ourapp.msappproxy.net/signin-oidc</code> but I can't seem to work out how. Changing the reply URL in Azure Portal doesn't help either (although I doubted it would, this is just for verification right?).</p>
  
  <p>I can't seem to find any guidance on this on this particular scenario, so that would be welcome. Otherwise, I'm left pondering the following:</p>
  
  <p>1, If I could change the redirect to ourapp.msappproxy.net/signin-oidc, would that solve the sign in issue?</p>
  
  <p>2, Do I even need an additional sign in step, or should I be changing the app to accept <code>AzureAppProxyUserSessionCookie</code> or <code>AzureAppProxyAccessCookie</code>? (If that's even an option?)</p>