Skip to content

Commit 75a0a18

Browse files
authored
Merge pull request #8251 from MicrosoftDocs/genlin-patch-4
Update troubleshoot-wif10201-no-validkey-securitytoken-mvc.md
2 parents 294c947 + 46d35a1 commit 75a0a18

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

support/entra/entra-id/app-integration/troubleshoot-wif10201-no-validkey-securitytoken-mvc.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
title: ASP.NET MVC Application Error WIF10201 No Valid Key Mapping Found for SecurityToken
3-
description: This article provides guidance for troubleshooting the error, "WIF10201- No valid key mapping found for securityToken."
3+
description: This article provides guidance for troubleshooting the error, WIF10201- No valid key mapping found for securityToken.
44
author: genlin
55
ms.author: bachoang
66
ms.service: entra-id
7-
ms.topic: troubleshooting-general
7+
ms.topic: troubleshooting-problem-resolution
88
ms.date: 02/05/2025
99
ms.custom: sap:Issues Signing In to Applications
1010
---
1111

12-
# "WIF10201: No valid key mapping found for securityToken" error in ASP.NET application
12+
# WIF10201: No valid key mapping found for securityToken error in ASP.NET application
1313

1414
This article provides guidance for troubleshooting an authentication issue that occurs in an ASP.NET MVC application that uses both [WS-Federation](https://github.com/Azure-Samples/active-directory-dotnet-webapp-wsfederation) OWIN middleware and [Windows Identity Foundation](../../../windows-server/user-profiles-and-logon/windows-identity-foundation.md) (WIF) to authenticate to Microsoft Entra ID.
1515

1616
## Symptoms
1717

1818
The ASP.NET MVC application that was previously working generates the following error message although no changes were made to the application:
1919

20-
```
20+
```output
2121
Error Details:
2222
Server Error in '/' Application.
2323
WIF10201: No valid key mapping found for securityToken: 'System.IdentityModel.Tokens.X509SecurityToken' and issuer: 'https://sts.windows.net/<Directory ID>/'.
@@ -29,7 +29,7 @@ Exception Details: System.IdentityModel.Tokens.SecurityTokenValidationException:
2929

3030
## Cause
3131

32-
To validate the signature of the token that's returned by the Entra ID after a successful sign-in, WIF uses the certificate thumbprints that are in the Web.config file, as shown in the following example:
32+
To validate the signature of the token that's returned by the Entra ID after a successful sign-in, WIF uses the certificate thumbprints that are in the **Web.config** file, as shown in the following example:
3333

3434
```web.config
3535
<issuerNameRegistry type="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry,
@@ -49,8 +49,8 @@ System.IdentityModel.Tokens.ValidatingIssuerNameRegistry">
4949

5050
The "WIF10201" error occurs if none of these certificate thumbprints match the one that's used by Entra ID to sign the token.
5151

52-
The Entra ID uses a [signing key rollover mechanism](/entra/identity-platform/signing-key-rollover) to update the certificate that's used to sign authentication tokens periodically. This key rollover causes the initial certificate thumbprints that are configured in the Web.config file to become invalid.
52+
The Entra ID uses a [signing key rollover mechanism](/entra/identity-platform/signing-key-rollover) to update the certificate that's used to sign authentication tokens periodically. This key rollover causes the initial certificate thumbprints that are configured in the **Web.config** file to become invalid.
5353

5454
## Solution
5555

56-
You can either manually update the certificate thumbprints that are in the Web.config file or automate the process through code. For more information, see [Best practices for keys metadata caching and validation](/entra/identity-platform/signing-key-rollover#best-practices-for-keys-metadata-caching-and-validation).
56+
You can either manually update the certificate thumbprints that are in the **Web.config** file or automate the process through code. For more information, see [Best practices for keys metadata caching and validation](/entra/identity-platform/signing-key-rollover#best-practices-for-keys-metadata-caching-and-validation).

0 commit comments

Comments
 (0)