In this blog post let us see how to configure the Third party relying party in the ADFS 2.0 Server. This blog post is a continuation of my previous post on Provider Hosted App for SharePoint 2013
After the deployment, if we go and launch the app, we will get the following error message on the screen.
By seeing the error, we can come to a conclusion that the ADFS Server which we configured for our claims cannot be accessed. This is because, when our site requests a Claim from the ADFS Server, our site needs to be added as a Relying Party on the ADFS Server. Now let us see how to add a Third party relying trust on the ADFS Server step by step.
1. Login to the ADFS Server.
2. Launch the ADFS Management Console.
3. On the left hand tree view, select the “Relying Party Trust”.
4. Right click “Relying Party Trusts” and select “Add Relying Party Trust”.
5. We will be prompted with the following screens.
6. Click on Start.
7. Select the “Enter data about the relying party manually” option and click next.
8. Enter the name for this relying party.
9. Select ADFS 2.0 and click next.
10. You will be prompted to browse for a Certificate to encrypt and decrypt the claims. But this is an optional. We can skip this step by pressing the Next.
11. After the above screen, you will be prompted to enter the relying Party url.
12. On the next screen, you can see the entered url will be added.
13. Select the Permit all users option
14. By this we came to the end of the steps.
15. Click on Next to launch the Claims rules.
16. On that Click “Add Rule”.
17. The claim rule template, by default, we can select the Send LDAP Attributes as Claims. Since we are going to use AD as our Claims supplier.
18. On the ClaimRule Name, give a name and the Attribute Store, Since we are going to use the Active Directory, choose that one.
19. On the mapping, let us assume for our example, we are using the E-mail Address as the LDAP Attribute and Outgoing Claim Type also as E-mail.
20. The finished wizard will look like this.
21. With this the configuration of ADFS has been completed.
Now go back to the Browser and Refresh the AppWeb. This will get loaded without any error.
In the next article, let us see how to fetch the Context of the SharePoint from our Provider Hosted Application.