Skip to main content

Does Sitecore Horizon support custom Azure AD federation provider?

I wanted to know if anyone has tried federated authentication with Sitecore Horizon?, I have a federated environment that enables users to login with Azure AD and Horizon isn't working (givesit gives 500 error) which I assume since its service host it doesn't know anything about my federation providers.

More details on the stack trace:

    System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
    2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
    2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
    System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
       --- End of inner exception stack trace ---
       at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Does Horizon support custom Azure AD federation provider?

wanted to know if anyone tried federated authentication with Horizon?, I have a federated environment that enables users to login with Azure AD and Horizon isn't working (gives 500) which I assume since its service host doesn't know anything about my federation providers.

More details on the stack trace:

    System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
    2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
    2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
    System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
       --- End of inner exception stack trace ---
       at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Does Sitecore Horizon support custom Azure AD federation provider?

I wanted to know if anyone has tried federated authentication with Sitecore Horizon?, I have a federated environment that enables users to login with Azure AD and Horizon isn't working (it gives 500 error) which I assume since its service host it doesn't know anything about my federation providers.

More details on the stack trace:

    System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
    2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
    2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
    System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
       --- End of inner exception stack trace ---
       at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
added 11 characters in body; edited title
Source Link
Richard Seal
  • 20.8k
  • 5
  • 44
  • 79

Does Sitecore Horizon support custom Azure AD federation provider?

More details on the stack trace:

More details on the stack trace:
System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

    System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
    2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
    2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
    System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
       --- End of inner exception stack trace ---
       at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Does Sitecore Horizon support custom Azure AD federation provider?

More details on the stack trace:
System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Does Horizon support custom Azure AD federation provider?

More details on the stack trace:


    System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
    2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
    2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
    System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
       at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
       at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
       --- End of inner exception stack trace ---
       at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
added 85 characters in body
Source Link

wanted to know if anyone tried federated authentication with Horizon?, iI have a federated environment that enables users to login with Azure AD and Horizon isn't working (gives 500) which iI assume since its service host doesntdoesn't know anything about my federation providers.

More details on the stack trace: System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken. at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token) at Newtonsoft.Json.Linq.JToken.Value[T](Object key) at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync() 2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.". 2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application. System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken. at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token) at Newtonsoft.Json.Linq.JToken.Value[T](Object key) at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync() --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)

More details on the stack trace:
System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

wanted to know if anyone tried federated authentication with Horizon?, i have a federated environment that enables users to login with Azure AD and Horizon isn't working (gives 500) which i assume since its service host doesnt know anything about my federation providers.

More details on the stack trace: System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken. at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token) at Newtonsoft.Json.Linq.JToken.Value[T](Object key) at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync() 2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.". 2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application. System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken. at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token) at Newtonsoft.Json.Linq.JToken.Value[T](Object key) at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync() --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)

wanted to know if anyone tried federated authentication with Horizon?, I have a federated environment that enables users to login with Azure AD and Horizon isn't working (gives 500) which I assume since its service host doesn't know anything about my federation providers.

More details on the stack trace:
System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
2020-03-21T17:33:58.4577714+00:00 [INF] (SerilogSample/RD501AC5CE434F) Error from RemoteAuthentication: "Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.".
2020-03-21T17:33:58.4598480+00:00 [ERR] (SerilogSample/RD501AC5CE434F) Connection id ""0HLU7MNJ7CENC"", Request id ""0HLU7MNJ7CENC:00000002"": An unhandled exception was thrown by the application.
System.Exception: An error was encountered while handling the remote login. ---> System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at Newtonsoft.Json.Linq.JToken.Value[T](Object key)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.Claims.UniqueJsonKeyClaimAction.Run(JObject userData, ClaimsIdentity identity, String issuer)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.GetUserInformationAsync(OpenIdConnectMessage message, JwtSecurityToken jwt, ClaimsPrincipal principal, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Source Link
Loading