title: Simplesamlphp IdP redirect to wrong url after logged in
body: <p>I'm trying to set up a web application (just an index.php file for now) where users can only use it if they are logged in via the Microsoft Azure idp.
  When a user reaches this page, it redirects him to the Microsoft login page.
  So far no problem, it works.
  But once logged in, I would like the user to be redirected to my index.php page but currently the redirection is to <a href="https://my-web-site.com/simplesaml/www/module.php/saml/sp/saml2-acs.php/default-sp" rel="nofollow noreferrer">https://my-web-site.com/simplesaml/www/module.php/saml/sp/saml2-acs.php/default-sp</a> with a page not found error.
  I don't understand how/where to change this redirection url.</p>
  <p>I have filled in the following information:</p>
  <ul>
  <li>metadata/saml20-idp-remote.php: metadatas from AzureAD</li>
  <li>config/config.php: baseurlpath, technicalcontact_name, technicalcontact_email, secretsalt and auth.adminpassword</li>
  <li>config/authsources.php:
  entityID to <a href="https://my-web-site.com/" rel="nofollow noreferrer">https://my-web-site.com/</a>.
  idp set to the url found in metadata.
  NameIDFormat set to 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' (found this on a tuto, don't really understand what it means).
  simplesaml.nameidattribute set to 'eduPersonTargetedID' (same as last)</li>
  </ul>
  <p>The server I'm working on run with nginx and I don't have permission to modify the configuration. So I didn't make the step 6 in the doc for installing simplesamlphp.</p>
  <p>My index.php is juste the same as the example in doc:</p>
  <pre><code>require_once('simplesaml/lib/_autoload.php');
  $as = new \SimpleSAML\Auth\Simple('default-sp');
  $as-&gt;requireAuth();
  $attributes = $as-&gt;getAttributes();
  print_r($attributes);
  </code></pre>
  <p>I though it was an ACS redirection, so in authsources.php within <code>'default-sp'</code> I added:</p>
  <pre><code>'AssertionConsumerService' =&gt; 'https://my-web-site/',
  </code></pre>
  <p>But nothing changed.</p>
  <p>The SimpleSAMLphp installation page at <a href="https://my-web-site.com/simplesaml/www/" rel="nofollow noreferrer">https://my-web-site.com/simplesaml/www/</a> is only partially working. All the frontpage_*.php are working but functionality send me either to 403 Forbidden or Page not found like:</p>
  <ul>
  <li>XML to SimpleSAMLphp metadata converter give 403 Forbidden</li>
  <li>[ Show metadata ] give Page not found: The given page was not found. The reason was: The module 'default-sp' was either not found, or wasn't enabled. The URL was: <a href="https://my-web-site.com/simplesaml/www/module.php/saml/sp/metadata.php/default-sp?output=xhtml" rel="nofollow noreferrer">https://my-web-site.com/simplesaml/www/module.php/saml/sp/metadata.php/default-sp?output=xhtml</a> (I think that's because I'm not logged in as Admin?)</li>
  <li>Login as administrator give 403 Forbidden</li>
  </ul>
  <p>PS: I convert the XML of my idp to SimpleSAMLphp metadata from a local Wamp installation of SimpleSAMLphp  since this function doesn't work on my web site.</p>
  <p>How can I change the redirection after logged in Microsoft Azure ? I've been looking for several days, but I can't find a solution. Did I miss something or is it not possible without change of nginx configuration ?</p>
  <p>Help will be very much appreciated (before it drives me crazy ;)), Thanks.</p>