WSFederationAuthenticationModule.FederatedSignOut Method (Uri, Uri)

.NET Framework (current version)

Signs out at the specified security token service (STS) by using the WS-Federation protocol.

Namespace:   System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public static void FederatedSignOut(
	Uri signOutUrl,
	Uri replyUrl


Type: System.Uri

The URL of the STS to receive the WS-Federation sign-out request message. Cannot be null.

Type: System.Uri

The URL to be sent as the wreply value in the sign-out request message.

Exception Condition

signOutUrl is not null and is not an absolute URI.


replyUrl is not null and is not an absolute URI.


signOutUrl is null.

Call this method to send a WS-Federation sign-out request message to the specified STS. You can optionally supply a value for the wreply parameter in the sign-out request.

The method does the following:

  1. Creates a WS-Federation sign-out request message by using the specified parameters.

  2. Calls the SessionAuthenticationModule.DeleteSessionTokenCookie method on the SAM to delete the session cookie.

  3. Redirects to the STS using the sign-out request message from the first step.

None of the sign-out events: SigningOut, SignedOut, or SignOutError are raised by this method. To delete the session without sending a sign-out request message to the STS, call one of the overloaded SignOut methods.


To perform passive sign-out by using the session token, the module relies on a value that was stored in the SessionSecurityToken.Context property during sign-in, for more information, see the GetSessionTokenContext method.

.NET Framework
Available since 4.5
Return to top