IdentityNotMappedException: Some or all identity references could not be translated

Unfortunately we are not sure what is causing this exception and cannot reproduce it locally. I guess the error message means the current user belongs to a group which may have been deleted. Unfortunately searching for this exception didn't return anything helpful.

The best thing we can suggest is to add that file to Radzen's code generation ignore list and adding a check:

foreach (var groupId in identity.Groups)
{
     if (groupId.IsValidTargetType(typeof(NTAccount))) // <-- new code start
     {
          var group = groupId.Translate(typeof(NTAccount));

          identity.AddClaim(new Claim(identity.RoleClaimType, group.Value.Split("\\").Last()));
          identity.AddClaim(new Claim(identity.RoleClaimType, group.Value));
     } // <-- new code end
}

If this does not work then a try catch block would be needed:

foreach (var groupId in identity.Groups)
{
     try // <-- new code start
     {
          var group = groupId.Translate(typeof(NTAccount));

          identity.AddClaim(new Claim(identity.RoleClaimType, group.Value.Split("\\").Last()));
          identity.AddClaim(new Claim(identity.RoleClaimType, group.Value));
     } 
     catch (Exception) 
     {
     }  // <-- new code end
}  

Hopefully the first customization will work and we will add it to Radzen.