b

How To Export ADFS 2.0 Metadata XML File

Sitender Kumar Novice (N+)

Posted on: Wed, 21 Jun 2017, Views : #59086

Topics : ADFS,


How To Export ADFS 2.0 Metadata XML File

In ADFS (Active Directory Federation Services), Relying Party Trusts can be configured manually or using metadata file.
Manually creation of a Relying Party Trust requires lots of details to be input, which is obtained from the partner organization. These details include URLs, relying party identifiers, certificate etc. Which may lead to misconfiguration or Typos.
You can use metadata xml file, which includes all required information and it is easier to import & export as well.

 

There is two way to export the ADFS Metadata. Please see the steps below.

 

Via GUI

The specified path for ADFS 2.0 Metadata is given below. Replace ADFS-ServerName with your actual server name.

https://ADFS-ServerName/FederationMetadata/2007-06/FederationMetadata.xml 

  1. Go to Internet Explorer or any web browser.
  2. Type https://ADFS-ServerName/FederationMetadata/2007-06/FederationMetadata.xml in address bar,
  3. Go to File Menu and click on “Save As…”, Enter the name for XML file and click on Save

 

Via PowerShell 

  1. Login into your ADFS Server and Start "Windows PowerShell Modules" not ""Windows PowerShell"
  2. Run below command. 
$mdbUrl = (Get-ADFSEndpoint | where-object {$_.Protocol -eq "Federation Metadata"}).FullUrl.ToString()
$httpHelper = new-object System.Net.WebClient
$metadataAsString = $httpHelper.DownloadString($mdbUrl)
$httpHelper.DownloadFile($mdbUrl , "C:\Users\$($env:username)\Desktop\metadata.xml")

 

 

Drop your feedback

Login Now Sign up



Note : You are required to be logged-in as a user to leave a feedback.