SharePoint And ADFS: SecurityTokenException – The issuer of the token is not a trusted issuer

This is a pretty common ADFS error, and there are all sorts of reasons that it could happen.

The stack trace will be this:


Microsoft.SharePoint.IdentityModel.SPTrustedIssuerNameRegistry.GetIssuerName(SecurityToken securityToken)

   at Microsoft.SharePoint.IdentityModel.SPPassiveIssuerNameRegistry.GetIssuerName(SecurityToken securityToken)

   at Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.CreateClaims(SamlSecurityToken samlSecurityToken)

   at Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.ValidateToken(SecurityToken token)

   at Microsoft.IdentityModel.Web.TokenReceiver.AuthenticateToken(SecurityToken token, Boolean ensureBearerToken, String endpointUri)

   at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest request)

   at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args)

   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


At the end of the day though, don’t sit around and fiddle with the SharePoint trusted authorities and yada yada yada, it boils down to a certificate problem. Basically the one that was specified as the signing certificate, when exported during the ADFS setup, is either malformed (the certificate chain is incomplete) or plainwrong wrong when the trusted issuer was being built up in SharePoint ala powershell. So to get around the error follow two pretty basic steps.

  1. Verify the appropriate certificate chain is present on the SharePoint server in both the trusted root authorities as well as in the SharePoint folder within the Certificate MMC snap-in. Never ever, ever delete the self issued ones that SharePoint provisioned within that folder. You will cause a Micheal Bay-spolosion. To verify the chain, just popup open the certificate details within some interface (like, the MMC :) ) doesn’t really matter what and verify that the chain is trusted and existent.
  2. Next, verify that you actually used the right certificate when specifying the certificate path when building the System.Security.Cryptography.X509Certificates.X509Certificate2 object to pass into your SPTrustedIdentityTokenIssuer. This is pretty easy to mess up when troubleshooting if you are swapping certs all over the place.

Both of these are in place, then that error will go away. Not that another won’t popup :)


SharePoint Federated Identity Process – Part 4 – The Benefits and Limitations of SharePoint Identity Federation

You will find that the federated identity has a very flexible structure to it. With that in mind, Adam Buenz’s Software House is able to add customers when they have a trust relationship in place by the issuer and they create claims mapping. This is all very simple behind the scenes action due to the process of such mapping being a very simple process. However, it is also important to realize here that the actual software component order application didn’t change at all. When you create a federation there is only some minor changes to that overall structure that need to be taken care of.

With the claims of ARB Security Solutions the ability to read the name of the business and the name of the employees is there. There won’t be any mix ups when it comes to finding out who accessed the application from Adam Buenz’s Software House and who accessed it from ARB Security Solutions. As a result there is less upkeep involved with federated identity. The accounts don’t need to be copied and maintained even though there are many security realms associated with them.

However, there are some limitations in place to be aware of. First, the way in which the claims mapping works has to be evaluated. Anyone that is with ARB Security Solutions is able to track software component orders due to the way in which the requests are set up with the type role and the value of software component order tracker in place. What you should do though is limit exactly who in the business will have access. That is what we will take a closer look at. 

It is vital that you are able to set up trust relationships. In this scenario the two entities are using ADFS 2.0 for the issuer of their security tokens. A public key certificate needs to be in place. This will be in a file that the administrators from ARB Security Solutions will send to Adam Buenz’s Software House. It is as easy as attaching it to an email and sending.

The administrators for ARB Security Solutions will configure ADFS so that they requests from the Adam Buenz’s Software House issuer will be accepted. All that needs to be done for this to occur is to select TBD menu in the ADFS. The Adam Buenz’s Software House administration will install the certificate on the ADFS host. This allows the federation to work with both issuers.