Commands › Exchange Online

New-FederationTrust

Exchange Online ExchangeOnlineManagement New-*

Set up a federation trust between your Exchange organization and the Microsoft Federation Gateway.

Quick start script

# New-FederationTrust — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-FederationTrust
$before | Format-List

# 3. Make the change (dry run first)
New-FederationTrust -Name <String> -ApplicationUri <String> -SkipNamespaceProviderProvisioning <SwitchParameter> -WhatIf
New-FederationTrust -Name <String> -ApplicationUri <String> -SkipNamespaceProviderProvisioning <SwitchParameter>

# 4. Verify and diff
$after = Get-FederationTrust
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

SkipNamespaceProviderProvisioning

New-FederationTrust [-Name] <String> -Thumbprint <String> -ApplicationUri <String>
 [-SkipNamespaceProviderProvisioning]
 [-AdministratorProvisioningId <String>]
 [-ApplicationIdentifier <String>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-MetadataUrl <Uri>]
 [-WhatIf]
 [<CommonParameters>]

FederationTrust

New-FederationTrust [-Name] <String> -Thumbprint <String>
 [-SuppressDnsWarning]
 [-UseLegacyProvisioningService]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-MetadataUrl <Uri>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (12)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies a friendly name for the federation trust.
-ApplicationUri String yes The ApplicationUri parameter specifies the primary domain used for the federated organization identifier.
-SkipNamespaceProviderProvisioning SwitchParameter yes The SkipNamespaceProviderProvisioning switch specifies that the trust and federated organization identifier are provisioned externally without using federation functionality in Microsoft Exchange. You don't need to...
-Thumbprint String yes The Thumbprint parameter specifies the thumbprint of a certificate issued by a public certification authority (CA) trusted by the Microsoft Federation Gateway. For more details, see...
-AdministratorProvisioningId String The AdministratorProvisioningId parameter specifies the provisioning key returned by the Microsoft Federation Gateway when an organization has already registered a SiteID or ApplicationID.
-ApplicationIdentifier String The ApplicationIdentifier parameter specifies the SiteID or ApplicationID when an organization has already registered a SiteID or ApplicationID.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-MetadataUrl Uri The MetadataUrl parameter specifies the URL where WS-FederationMetadata is published by the Microsoft Federation Gateway.
-SuppressDnsWarning SwitchParameter The SuppressDNSWarning switch specifies whether to display the DNS warning message for creating TXT records in your public DNS when running the New-FederationTrust cmdlet. You don't need to specify a value with this switch.
-UseLegacyProvisioningService SwitchParameter The UseLegacyProvisioningService switch specifies that the legacy interface on the Microsoft Federation Gateway is used for managing the federation trust, including federated domains, certificates, and federation...
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.