After you have enabled IFD on the Dynamics 365 Server you will need to create a relying party for the IFD endpoint on the AD FS server.
On the computer that is running Windows Server where the AD FS federation server is installed, start AD FS Management.
In the Navigation Pane, expand Trust Relationships, and then select Relying Party Trusts.
On the Actions menu located in the right column, select Add Relying Party Trust.
In the Add Relying Party Trust Wizard, select Start.
On the Select Data Source page, select Import data about the relying party published online or on a local network, and then type the URL to locate the federationmetadata.xml file.
This federation metadata is created during IFD Setup, for example, https://auth.contoso.com/FederationMetadata/2007-06/FederationMetadata.xml
Type this URL in your browser and verify that no certificate-related warnings appear.
Select Next.
On the Specify Display Name page, type a display name, such as Dynamics 365 IFD Relying Party
, and then select Next.
On the Configure Multi-factor Authentication Now page, make your selection and select Next.
On the Choose Issuance Authorization Rules page, select Permit all users to access this relying party, and then select Next.
On the Ready to Add Trust page, on the Identifiers tab, verify that Relying party identifiers has three identifiers such as the following:
If your identifiers differ from the above example, select Previous in the Add Relying Party Trust Wizard and check the Federation metadata address.
Select Next, and then select Close.
If the Rules Editor appears, select Add Rule. Otherwise, in the Relying Party Trusts list, right-click the relying party object that you created, select Edit Claims Rules, and then select Add Rule.
Important
Be sure the Issuance Transform Rules tab is selected.
In the Claim rule template list, select the Pass Through or Filter an Incoming Claim template, and then select Next.
Create the following rule:
Select Finish.
In the Rules Editor, select Add Rule, and in the Claim rule template list, select the Pass Through or Filter an Incoming Claim template, and then select Next.
Select Finish.
In the Rules Editor, select Add Rule.
In the Claim rule template list, select the Transform an Incoming Claim template, and then select Next.
Create the following rule:
Select Finish, and, when you have created all three rules, select OK to close the Rules Editor.
If you're AD FS server is running Windows Server 2016, run the following Windows PowerShell cmdlet: