
JoshH.59428 (Customer) asked a question.
I have a .NET 5.0 (upgraded from .NET Core) hosted Blazor solution integrated with Okta.
I am able to log in without issue, but when I am redirected back to my app I'm running into an issue mapping roles to claims.
```crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: InvalidOperation_EnumFailedVersion
System.InvalidOperationException: InvalidOperation_EnumFailedVersion
at System.Collections.Generic.List`1.Enumerator[[System.Security.Claims.Claim, System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNextRare()
at System.Collections.Generic.List`1.Enumerator[[System.Security.Claims.Claim, System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
at System.Security.Claims.ClaimsIdentity.FindAll(Predicate`1 match)+MoveNext()
at WFBC.Client.RolesClaimsPrincipalFactory.CreateUserAsync(RemoteUserAccount account, RemoteAuthenticationUserOptions options)
at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService`3.<GetAuthenticatedUser>d__26[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=5.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=5.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.AspNetCore.Components.WebAssembly.Authentication.OidcProviderOptions, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=5.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()```
The error is being thrown here:
``` foreach (var existingClaim in roleClaims)
{
identity.RemoveClaim(existingClaim);
}````
The only info I've been able to find seems to point to attempting to modify an IEnumerable, but in this case I am not. roleClaims is an IEnumerable, but identity is a ClaimsIdentity object.
This was working previously, so I'm not sure if it's caused by the .NET 5.0 upgrade or some changes to the Okta nuget packages. Unfortunately Blazor debugging into the client project is far from production ready, and not working for me currently.

Hi Josh,
Please send an email to open a case to our developer@okta.com inbox. This needs be properly investigated with our developer support team.