@@ -154,3 +154,63 @@ Navigate to the SimpleSAMLphp installation folder and create a folder called cer

Create the Relying Party Trust in ADFS 2012R2
-----------------------------------------------
Now that the Service Provider configuration is complete, SimpleSAMLphp creates the SAML 2.0 SP metadata that we can use to import in to ADFS.
1. Navigate to the web application’s /simplesaml application and click the Federation tab. As you can see, our previous default-sp configuration (the one we configured for use with Azure AD) is here, but now so is the one I’ve called transishun-sp. If you’re wondering where the heck that URL came from, it’s because we left the entityID value null when we specified the SP configuration.
```php
// The entity ID of this SP.
// Can be NULL/unset, in which case an entity ID is generated based on the metadata URL.
'entityID'=>null
```

2. If you wish, click the Show metadata link to see the metadata but before you do, copy the Entity ID: url. We need to give this to ADFS when we configure the Relying Party Trust.

3. On your ADFS server, open the ADFS Management console, expand Trust Relationships and select the Relying Party Trusts node. In the Actions pane, click Add Relying Party Trust…

4. Click Start then paste the Entity ID url in to the Federation Metadata address field and click Next.

5. Accept the warning.

6. Next your way through the wizard until you reach the Ready To Add Trust page. Here you’ll want to review the numerous tabs – check the Encryption and Signature tabs have certificates associated with them. Even if they don’t and you’ve not completed the previous section to create the certificates, the RPT can be updated whenever you like.

7. Click Next and the sso.lewisroberts.com Relying Party Trust is added.

8. Select the Relying Party Trust we’ve just added and then click Edit Claim Rules…

9. Add an Issuance Transform Rule based on the Send LDAP Attributes as Claims template. Select at least UPN, whatever else you choose here is your choice but add another such as mail or uid.

10. Add another Issuance Transform Rule but this time based on the Transform an Incoming Claim template. This one is important and is required to allow SimpleSAMLphp to talk with ADFS.

11. Once configured, you should have two Issuance Transform Rules that look as follows:
