Namespace Mapping between WIF 3.5 and WIF 4.5

Beginning with .NET 4.5, Windows Identity Foundation (WIF) has been fully integrated into the .NET Framework. This integration engendered name changes and some consolidation of the WIF namespaces and API surface. This topic provides some guidance and a general mapping between the WIF 3.5 namespaces and the WIF 4.5 namespaces. It is not intended to be exhaustive, but rather provide some general information about where to find familiar WIF 3.5 classes in WIF 4.5. For more detailed information about the differences between WIF 3.5 and WIF 4.5, see What's New in Windows Identity Foundation 4.5. For guidance about how to migrate an applications built using WIF 3.5 to WIF 4.5, see Guidelines for Migrating an Application Built Using WIF 3.5 to WIF 4.5.

WIF 3.5 to WIF 4.5 Namespace Map

The WIF classes, which were collected under the Microsoft.IdentityModel namespaces in WIF 3.5, are now distributed among the following namespaces: System.Security.Claims, System.ServiceModel.Security, and the System.IdentityModel namespaces in WIF 4.5. In addition some WIF 3.5 namespaces were consolidated or dropped entirely in WIF 4.5.


The following System.IdentityModel namespaces contain classes that implement the WCF claims-based identity model: System.IdentityModel.Claims, System.IdentityModel.Policy, and System.IdentityModel.Selectors. The WCF claims-based identity model is superseded by WIF. You should not use classes in these three namespaces when building solutions based on WIF.

The following table provides information about where WIF 3.5 classes can be found in WIF 4.5.

WIF 3.5 Namespace WIF 4.5 Namespace Comments
Microsoft.IdentityModel System.IdentityModel - Most of the classes that represent constants are not implemented.
- The classes that are used to build security token services have been moved from Microsoft.IdentityModel.SecurityTokenService to System.IdentityModel.
- The classes in Microsoft.IdentityModel.Threading have been moved to System.IdentityModel.
- The ExceptionMapper and MruSecurityTokenCache classes are not implemented.
Microsoft.IdentityModel.Claims System.Security.Claims - The IClaimsPrincipal and IClaimsIdentity interfaces are not implemented in WIF 4.5. Instead ClaimsPrincipal and ClaimsIdentity are now the base classes from which most .NET principal and identity classes derive. This means there is no need for specialized claims principal and identity classes like Microsoft.IdentityModel.Claims.WindowsClaimsPrincipal and Microsoft.IdentityModel.Claims.WindowsClaimsIdentity in WIF 4.5, use WindowsPrincipal and WindowsIdentity instead. The same is true for other for the other specialized claims principal and identity classes that existed in WIF 3.5.
- The Microsoft.IdentityModel.Claims.ClaimsCollection class is not implemented in WIF 4.5. Instead, collections of claims are exposed as enumerable collections of type Claim.
- ClaimsPrincipal and ClaimsIdentity provide methods that now fully support LINQ.
Microsoft.IdentityModel.Configuration System.IdentityModel.Configuration Some elements and classes have undergone name changes and some have been dropped in WIF 4.5; for example Microsoft.IdentityModel.Configuraiton.ServiceConfiguration is now IdentityConfiguration.
Microsoft.IdentityModel.Protocols System.IdentityModel.Services -
Microsoft.IdentityModel.Protocols.WSFederation System.IdentityModel.Services -
Microsoft.IdentityModel.Protocols.WSFederation.Metadata System.IdentityModel.Metadata -
Microsoft.IdentityModel.Protocols.WSIdentity Not Implemented in WIF 4.5 In WIF 3.5 contained classes to support CardSpace, not implemented in WIF 4.5.
Microsoft.IdentityModel.Protocols.WSTrust Split between the System.IdentityModel.Protocols.WSTrust and System.ServiceModel.Security namespaces. Classes that represents WS-Trust artifacts are in the System.IdentityModel.Protocols.WSTrust namespace; for example, the RequestSecurityToken class. Classes that represent WCF service contracts, service hosts, and channels that enable a WCF service to communicate using the WS-Trust protocol are in the System.ServiceModel.Security namespace; for example, the WSTrustServiceHost class.
Microsoft.IdentityModel.Protocols.WSTrust.Bindings Not Implemented in WIF 4.5 -
Microsoft.IdentityModel.Protocols.XmlEncryption Not Implemented in WIF 4.5 Contained classes that represent XML Encryption constants in WIF 3.5. These constants are not implemented in WIF 4.5.
Microsoft.IdentityModel.Protocols.XmlSignature System.IdentityModel The EnvelopingSignature class and classes that represent constants are not implemented.
Microsoft.IdentityModel.SecurityTokenService Split between the System.IdentityModel, System.IdentityModel.Protocols.WSTrust, and System.IdentityModel.Tokens namespaces. -
Microsoft.IdentityModel.Threading System.IdentityModel -
Microsoft.IdentityModel.Tokens System.IdentityModel.Tokens -
Microsoft.IdentityModel.Tokens.Saml11 System.IdentityModel.Tokens -
Microsoft.IdentityModel.Tokens.Saml2 System.IdentityModel.Tokens -
Microsoft.IdentityModel.Web System.IdentityModel.Services -
Microsoft.IdentityModel.Web.Configuration System.IdentityModel.Services.Configuration Classes that provide configuration for passive (WS-Federation) scenarios have largely been moved to System.IdentityModel.Services.Configuration; however, some of these classes are in System.IdentityModel.Services.
Microsoft.IdentityModel.Web.Controls Not Implemented in WIF 4.5 The classes in Microsoft.IdentityModel.Web.Controls implemented the Federated Passive Sign-In Control, which does not exist in WIF 4.5.
Microsoft.IdentityModel.WindowsTokenService Not Implemented in WIF 4.5 -

See Also

What's New in Windows Identity Foundation 4.5
Guidelines for Migrating an Application Built Using WIF 3.5 to WIF 4.5