Adds a relying party trust for the Web Application Proxy.
Active Directory · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft ADFS reference: Adds a relying party trust for the Web Application Proxy. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Add-AdfsWebApplicationProxyRelyingPartyTrust. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / ADFS · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-AccessControlPolicyName
Specifies the name of the access control policy.
-AccessControlPolicyParameters
Specifies the parameters of the access control policy.
-AdditionalAuthenticationRules
Specifies rules for additional authentication on the proxy. For more information about the claims language for rules, see Understanding Claim Rule Language in AD FS 2.0 & Higher on TechNet.
-AdditionalAuthenticationRulesFile
Specifies a file that contains rules for additional authentication for this relying party.
-AlwaysRequireAuthentication
Indicates that the proxy requires authentication for access, even if the proxy has previously authenticated credentials for access. Specify this parameter to require users to always supply credentials to access sensitive resources.
-Confirm
Prompts you for confirmation before running the cmdlet.
-Enabled
Indicates whether to enable this relying party trust. Specify a value of $True for this parameter to allow authentication and authorization to the proxy.
-Identifier (required)
Specifies an array of unique identifiers. The proxy uses the identifiers that you specify to specify its corresponding relying party trust when it initiates sign-in requests to obtain tokens for itself. No other trust can use an identifier from this list. As common practice, you can use Uniform Resource Identifiers (URIs) as unique identifiers for a relying party trust, or use any string.
-Name (required)
Specifies a name. The cmdlet adds the Web Application Proxy relying party trust that has the friendly name that you specify.
-NotBeforeSkew
Specifies the skew, as an integer, for the time stamp that marks the beginning of the validity period. The higher this number is, the further back in time the validity period begins with respect to the time that the claims are issued for the relying party. By default, this value is 0. Specify a positive value if validation fails on the Web Application Proxy relying party because the validity period has not yet begun.
-Notes
Specifies notes. The cmdlet stores the notes that you specify for the Web Application Proxy relying party trust.
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
-TokenLifetime
Specifies the duration, in minutes, for which the claims that are issued to the relying party are valid.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
Windows with the ADFS module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Add a relying party trust
Add-AdfsWebApplicationProxyRelyingPartyTrust
This command adds the Web Application Proxy relying party trust. When you first deploy the Web Application Proxy role service, the trust exists by default. Use this example only if you deleted the Web Application Proxy relying party trust. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.