title: Azure active directory dynamic reply url
body: <p>I'm in the following situation:
  I have a nodejs application that uses the azure active folder authentication system through the passport-azure-ad module.</p>
  
  <p>At the moment my reply url, the url that I registered on my portal and that I have set as redirectUrl in my passport strategy configuration, is <a href="https://localhost:3000/microsoft/auth" rel="nofollow noreferrer">https://localhost:3000/microsoft/auth</a>.
  Everything works when I go through the authentication process from the machine that runs the server, but obviously fails from any other device after I sign in with my microsoft account and <a href="https://localhost:3000/microsoft/auth" rel="nofollow noreferrer">https://localhost:3000/microsoft/auth</a> gets returned(to be more precise, the authentication goes well but the returned page doesn't load for obvious reasons).</p>
  
  <p>If I change the redirectUrl in my passport strategy(I'm using OIDCStrategy) configuration to where the server is running, e.g. <a href="https://machine.that.runs.the.server:3000/microsoft/auth" rel="nofollow noreferrer">https://machine.that.runs.the.server:3000/microsoft/auth</a> without first registering the url on the azure portal I get an error related to the reply/redirect url mismatching when I try to authenticate.</p>
  
  <p>The reason why I don't want to register <a href="https://machine.that.runs.the.server:3000/microsoft/auth" rel="nofollow noreferrer">https://machine.that.runs.the.server:3000/microsoft/auth</a> on the portal it's because I would like to be able to run the server from any machine and have any other machine connect to it and be correctly redirected after the authentication process, or at least on any machine in my office internal network.</p>
  
  <p>So what I'm asking is if there is a way to either remove the reply/redirect url check or to have some kind of dynamic redirectUrl option where I can set the reply URL in my request.
  If none of those two can be done I would like to know if there is a way to register a reply URL from the portal that works for all the machines in my network like 10.3.144.x:3000/microsoft/auth.</p>
  
  <p>Thanks in advance.</p>