diff --git a/docs/simplesamlphp-googleapps.txt b/docs/simplesamlphp-googleapps.txt
index 293d830a645cbc1ec35f33408e5f83244ce6308b..500602f5ff233bb3b2cd7786ba253a8f67d664ac 100644
--- a/docs/simplesamlphp-googleapps.txt
+++ b/docs/simplesamlphp-googleapps.txt
@@ -7,7 +7,7 @@ Setting up a simpleSAMLphp SAML 2.0 IdP to use with Google Apps for Education
 	http://daringfireball.net/projects/markdown/syntax
 -->
 
-  * Version: `$Id: simplesamlphp-install.txt 1297 2009-02-23 09:03:26Z andreassolberg $`
+  * Version: `$Id$`
 
 
 
diff --git a/docs/simplesamlphp-idp-more.txt b/docs/simplesamlphp-idp-more.txt
index 442bd85296509d2e89602dd5e565bc020f55300a..708265d78c0ea656769f490b0b56f64814119058 100644
--- a/docs/simplesamlphp-idp-more.txt
+++ b/docs/simplesamlphp-idp-more.txt
@@ -1,5 +1,5 @@
 SimpleSAMLphp Identity Provider Advanced Topics
-===========================================
+===============================================
 
 <!-- 
 	This file is written in Markdown syntax. 
@@ -26,3 +26,17 @@ The attribute release consent is documented in a separate document.
 
   * [Documentation on the consent module](https://rnd.feide.no/content/consent-module)
 
+
+IdP-first flow
+--------------
+
+If you do not want to start the SSO flow at the SP, you may use the IdP-first setup. To do this, redirect the user to the SSOService endpoint on the IdP with one parameter `spentityid` that match the SP EntityId that the user should be logged into.
+
+Here is an example of such an url:
+
+	https://sp.example.org/simplesaml/saml2/idp/SSOService.php?spentityid=dev.andreas.feide.no
+
+When the IdP-first flow is used an extra parameter is needed in the `saml20-sp-hosted` metadata. This is the `RelayState` parameter that tells the SP which URL to redirect the user to after the user is successfully authenticated. This typically is the frontpage of your application. An example of this can be:
+
+	'RelayState' => '/',
+