Others

Fix the AD FS Export-FederationConfiguration.ps1 Database Error

Jason MillerJason Miller Nov 25, 2026 868 views

Question details

The user needs to export the federation configuration during an AD FS 2.1 to AD FS 3.0 migration.

Fix the AD FS Federation Configuration Export Database Error
Product
Active Directory Federation Services (AD FS)
Device & OS
not provided
Scenario
Running Export-FederationConfiguration.ps1 from an AD FS server that uses a separate SQL Server configuration database.
Observed behavior
The script fails because it cannot read service-setting data from the configuration database.
Before you start

Identify the AD FS server, the SQL Server instance hosting its configuration database, and the account that will run the export. Ask a SQL Server administrator to help verify connectivity and permissions.

Solution 1Recommended

Check SQL Server Connectivity and AD FS Database Permissions

Use this approach when the export script cannot read settings from a separate AD FS configuration database.

1
Run the script on the AD FS server

Sign in to the AD FS server with the account intended for the migration and open PowerShell. Navigate to the folder containing Export-FederationConfiguration.ps1.

2
Verify database connectivity

Confirm that the AD FS server can reach the SQL Server instance hosting the configuration database. If SQL Server Management Studio is available, connect to that instance using the intended account and check that the database is accessible.

3
Review the account's permissions

Ask the SQL Server administrator to review the account's access to the AD FS configuration database and grant the permissions required for the export. In the reported case, granting the account the SQL Server sysadmin role allowed the export to complete.

4
Retry the export

In PowerShell on the AD FS server, run the export script again with the parameters required for your migration. If needed, enter .\Export-FederationConfiguration.ps1 -? to review its syntax.

Check SQL Server Connectivity and AD FS Database Permissions
Limit elevated access: The sysadmin role has broad SQL Server privileges. Have a database administrator assess whether it is necessary, approve any temporary elevation, and remove it after the export if it is no longer needed.
Free Microsoft Office alternative

Document Your AD FS Migration with WPS Office

WPS Office does not fix AD FS or SQL Server permissions. It is a free, lightweight Office alternative with a familiar interface for maintaining migration notes and worksheets, and its Microsoft Office format support helps you move existing files seamlessly.

Record AD FS migration steps and permission checks in documents or spreadsheetsOpen and edit common Microsoft Office formats, including DOCX, XLSX, and PPTXWork in a familiar interface that makes switching from Microsoft Office easierUse a free, lightweight office suite for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Where should I run Export-FederationConfiguration.ps1?

Run the script from the AD FS server. Open PowerShell there and navigate to the folder containing the script before running it with the required migration parameters.

Why can the export fail when the AD FS database is on another server?

The AD FS server may be unable to reach the SQL Server instance, or the account running the script may lack database permissions. Check both connectivity and account access with the SQL Server administrator.

Does the export account always need the SQL Server sysadmin role?

Not necessarily. Sysadmin access resolved the reported case, but it grants broad privileges. Ask a database administrator to assess the required permissions and any temporary elevation.

Can WPS Office fix this AD FS database error?

No. The error requires AD FS and SQL Server connectivity or permission checks. WPS Office can be used separately to document the migration in files such as DOCX or XLSX.