I upgraded ADFS from Windows Server 2012 R2 to Windows Server 2016 and found that some of the Realying Party trusts were marked as error state. I tried to update metadata from GUI and received following error:

update-meta1

Found Microsoft blog article how to fix this error with PowerShell

Three options available and I used the third one because I have RP trust in place. Same error message popup when you are trying to add Relaying Party Trust.

  1. Add-AdfsRelyingPartyTrust -Name “feta-acs.accesscontrol.windows.net” -MetadataUrl “https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml”
  2. Add-AdfsRelyingPartyTrust -Name “feta-acs.accesscontrol.windows.net” -MetadataFile “C:\Temp\FederationMetadata.xml”
  3. Update-AdfsRelyingPartyTrust -TargetName “feta-acs.accesscontrol.windows.net”

update-meta2

After PowerShell command has gone through RP is updated correctly.

update-meta3

Windows Server version used

update-meta4