title: Authentication MSGraph fails on callback
body: <p>So I have set up an entire portal with API to connect to MSGraph, so far I was able to get it to work for my own organization, problem is that I am now testing how an organization has to be setup in order for MSGraph to function. For some reason whenever I try to authenticate there is a small chance that everything works as it should, but most of the time it fails after I have loggedin as it always sends a failureredirect on the callback.</p>
  <p>So I am wondering as to why it fails on this callback and how I could catch the error.</p>
  <p>This is the code of my callback method:</p>
  <pre class="lang-js prettyprint-override"><code>erouter.post(&quot;/auth/callback&quot;, function(req, res, next) {
      passport.authenticate(&quot;azuread-openidconnect&quot;, {
          response: res,
          failureRedirect: process.env.WEBSITE_URL + &quot;settings?error=permission_denied&quot;,
          successRedirect: process.env.WEBSITE_URL + &quot;settings?auth=success&quot;,
      })(req, res, next);
  });
  </code></pre>
  <p>I have no clue as to why it won't work for other organizations.</p>
  <p>Any ideas on this?</p>
  <p>Thanks in advance!</p>