<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: .Net/C# AspNetCore MVC SSO with OpenIdConnect - returning IDX10000 in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Net-C-AspNetCore-MVC-SSO-with-OpenIdConnect-returning-IDX10000/m-p/2492867#M102252</link>
    <description>&lt;P&gt;After doing some testing and creating a CustomOpenIdConnectHandler (not recommended), I see that in the OpenIdConnect event&amp;nbsp; "OnTokenResponseReceived",&amp;nbsp;TokenResponseReceivedContext.ProtocolMessage.IdToken is null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yet when I update my appsettings.json to use my Azure AD App Registration settings, IdToken is not null. I think I'm missing something on Qlik's configuration side ?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 23:48:01 GMT</pubDate>
    <dc:creator>h4ck3r8ug5</dc:creator>
    <dc:date>2024-11-14T23:48:01Z</dc:date>
    <item>
      <title>.Net/C# AspNetCore MVC SSO with OpenIdConnect - returning IDX10000</title>
      <link>https://community.qlik.com/t5/App-Development/Net-C-AspNetCore-MVC-SSO-with-OpenIdConnect-returning-IDX10000/m-p/2492843#M102251</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have AspNetcore MVC web app doing SSO using the nuget package OpenIdConnect. I using an web client type (from Qlik Cloud).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm very new to Qlik but very familar with OAuth and C#.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What I'm trying to do is create a login page that performs sso against Qlik and when the call returns, print out Claims from the ClaimsPrincipal. I've done this on multiple occasions with KeyCloak, Azure AD but when it comes to Qlik, I'm getting the error:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"ArgumentNullException: IDX10000: The parameter 'token' cannot be a 'null' or an empty object. (Parameter 'token')"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;My client is configured to Web and I've added &lt;A href="https://localhost:5001/signin-oidc" target="_blank" rel="noopener"&gt;https://localhost:5001/signin-oidc&lt;/A&gt;&amp;nbsp;to the Return URL and &lt;A href="https://localhost:5001" target="_blank" rel="noopener"&gt;https://localhost:5001&lt;/A&gt;&amp;nbsp;to the Origins.&lt;/P&gt;
&lt;P&gt;This is the URL in the browser after the call comes back from Qlik (Thiis is an old auth code)&lt;BR /&gt;&lt;A href="https://localhost:5001/signin-oidc?code=1Na9rXYSwYtUQ50a5z29VjNYktiBKWRYx7S8j_cjbSk&amp;amp;state" target="_blank" rel="noopener"&gt;https://localhost:5001/signin-oidc?code=1Na9rXYSwYtUQ50a5z29VjNYktiBKWRYx7S8j_cjbSk&amp;amp;state&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Snippet of my C# program.cs code:&lt;/P&gt;
&lt;P&gt;builder.Services.AddAuthentication(options =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;options.DefaultScheme = "Cookies";&lt;BR /&gt;options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;&lt;BR /&gt;})&lt;BR /&gt;.AddCookie("Cookies")&lt;BR /&gt;.AddOpenIdConnect(OpenIdConnectDefaults.AuthenticationScheme, config =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;config.Authority = builder.Configuration["OAuth:Authority"];&lt;BR /&gt;config.ClientId = builder.Configuration["OAuth:ClientId"];&lt;BR /&gt;config.ClientSecret = builder.Configuration["OAuth:ClientSecret"];&lt;BR /&gt;config.ResponseType = OpenIdConnectResponseType.Code;&lt;BR /&gt;config.SaveTokens = true;&lt;/P&gt;
&lt;P&gt;config.Scope.Clear();&lt;BR /&gt;foreach (var scope in builder.Configuration.GetSection("OAuth:Scopes").GetChildren())&lt;BR /&gt;{&lt;BR /&gt;config.Scope.Add(scope.Value);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;config.CallbackPath = builder.Configuration["OAuth:CallbackUri"];&lt;BR /&gt;config.GetClaimsFromUserInfoEndpoint = true;&lt;/P&gt;
&lt;P&gt;Can anyone assist with some guidance?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Charles&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 22:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Net-C-AspNetCore-MVC-SSO-with-OpenIdConnect-returning-IDX10000/m-p/2492843#M102251</guid>
      <dc:creator>h4ck3r8ug5</dc:creator>
      <dc:date>2024-11-14T22:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: .Net/C# AspNetCore MVC SSO with OpenIdConnect - returning IDX10000</title>
      <link>https://community.qlik.com/t5/App-Development/Net-C-AspNetCore-MVC-SSO-with-OpenIdConnect-returning-IDX10000/m-p/2492867#M102252</link>
      <description>&lt;P&gt;After doing some testing and creating a CustomOpenIdConnectHandler (not recommended), I see that in the OpenIdConnect event&amp;nbsp; "OnTokenResponseReceived",&amp;nbsp;TokenResponseReceivedContext.ProtocolMessage.IdToken is null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yet when I update my appsettings.json to use my Azure AD App Registration settings, IdToken is not null. I think I'm missing something on Qlik's configuration side ?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 23:48:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Net-C-AspNetCore-MVC-SSO-with-OpenIdConnect-returning-IDX10000/m-p/2492867#M102252</guid>
      <dc:creator>h4ck3r8ug5</dc:creator>
      <dc:date>2024-11-14T23:48:01Z</dc:date>
    </item>
  </channel>
</rss>

