<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Claim not present in .Net]]></title><description><![CDATA[<p dir="auto">Hi folks,</p>
<p dir="auto">After FusionAuth login, I don't have role claims in the .Net Identity. I use the <strong>.Net+React POC</strong> found here<br />
<a href="https://github.com/FusionAuth/fusionauth-example-asp-net5-react" rel="nofollow ugc">https://github.com/FusionAuth/fusionauth-example-asp-net5-react</a></p>
<p dir="auto">This problem is similar to this post<br />
<a href="https://fusionauth.io/community/forum/topic/1485/role-claims-issue-with-openidconnect-netcore5">https://fusionauth.io/community/forum/topic/1485/role-claims-issue-with-openidconnect-netcore5</a><br />
However not exactly the same, I use both .Net and React, no razor pages. The solution of the post above doesn't work because <code>AddOpenIdConnect ... OnMessageReceived</code> is never called. Not sure it's normal.</p>
<p dir="auto">As I see things in the <strong>.Net+React POC</strong>, they handle everything in the Session, they don't get anything special in <code>HttpContext.User.Identity</code> , is it normal ?<br />
Does it mean we can't have Role Claims when using a .Net + React solution ? I would expect the JWT token to convert into a proper .Net Identity.</p>
<p dir="auto">If anyone can get Role Claims in the <strong>.Net+React POC</strong>, please tell how</p>
]]></description><link>https://fusionauth.io/community/forum/topic/2163/claim-not-present-in-net</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 08:52:57 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/2163.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 Aug 2022 06:49:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Claim not present in .Net on Wed, 20 Sep 2023 07:08:32 GMT]]></title><description><![CDATA[<p dir="auto">I have the exact same problem. I have a Net6 Web Api project with swagger client configured. I have no claims</p>
<p dir="auto">I have AddJwtBearer with this settings</p>
<p dir="auto">services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)<br />
.AddJwtBearer(options =&gt;<br />
{<br />
options.Authority = fusionAuthAuthority;<br />
options.Audience = fusionAuthAudience;<br />
options.RequireHttpsMetadata = false; // DEV only!!<br />
});</p>
<p dir="auto">and swagger client configured this way</p>
<p dir="auto">services.AddSwaggerGen(c =&gt;<br />
{<br />
c.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme<br />
{<br />
Type = SecuritySchemeType.OAuth2,<br />
Flows = new OpenApiOAuthFlows<br />
{<br />
AuthorizationCode = new OpenApiOAuthFlow<br />
{<br />
AuthorizationUrl = new Uri($"{fusionAuthAuthority}oauth2/authorize?audience={fusionAuthAudience}", UriKind.Absolute),<br />
TokenUrl = new Uri($"{fusionAuthAuthority}oauth2/token", UriKind.Absolute),<br />
Scopes = new Dictionary&lt;string, string&gt;() { }</p>
<pre><code>         }
     }
 });

 c.AddSecurityRequirement(new OpenApiSecurityRequirement
 {
     {
         new OpenApiSecurityScheme
         {
             Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "oauth2" }
         },
         Array.Empty&lt;string&gt;()
     }
 });

 c.ExampleFilters();

 c.DocumentFilter&lt;OrderTagsDocumentFilter&gt;();
</code></pre>
<p dir="auto">});</p>
<p dir="auto">Any updates on this issue or hints ?</p>
<p dir="auto">Thanks<br />
Manlio</p>
]]></description><link>https://fusionauth.io/community/forum/post/6581</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/6581</guid><dc:creator><![CDATA[manlio.marchica]]></dc:creator><pubDate>Wed, 20 Sep 2023 07:08:32 GMT</pubDate></item><item><title><![CDATA[Reply to Claim not present in .Net on Mon, 12 Sep 2022 10:38:51 GMT]]></title><description><![CDATA[<p dir="auto">Ok thanks <a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/645">@joshua</a> for your honest reponse <img src="https://fusionauth.io/community/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=rcgg4tg866g" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> There is no shame to be new to .Net, it became so  different to Java and other technos around. For sure let me know in case something new pops up.</p>
]]></description><link>https://fusionauth.io/community/forum/post/5468</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5468</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Mon, 12 Sep 2022 10:38:51 GMT</pubDate></item><item><title><![CDATA[Reply to Claim not present in .Net on Fri, 09 Sep 2022 02:15:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/2017">@lionel-selosse</a>  I am not very familiar with dot net as a language; I would have to review that particular example application.</p>
<p dir="auto">We are always open to feedback on our documentation and example applications.  There may also be an opportunity to develop an alternative example application making use of other dot net security paradigms/workflows.</p>
<p dir="auto">I will check in with the team and let you know if anything else surfaces to relay on.</p>
<p dir="auto">Thanks,<br />
Josh</p>
]]></description><link>https://fusionauth.io/community/forum/post/5462</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5462</guid><dc:creator><![CDATA[joshua]]></dc:creator><pubDate>Fri, 09 Sep 2022 02:15:38 GMT</pubDate></item><item><title><![CDATA[Reply to Claim not present in .Net on Wed, 07 Sep 2022 08:30:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/645">@joshua</a> said in <a href="/community/forum/post/5449">Claim not present in .Net</a>:</p>
<blockquote>
<p dir="auto">I might need a bit more context, but it sounds like you are looking to store user identity information outside of a session.</p>
</blockquote>
<p dir="auto">Indeed, the default .Net way to handle authentication and roles is of course not keeping user info (data from JWT token) in Session (ISession interface). .Net uses Identity and Claims for those sensitive data. This is where information from the JWT token should normally be stored. But looking at the POC on GitHub, it looks like you guys store this in Session, nothing in Identity and Claims. Am I wrong ?</p>
]]></description><link>https://fusionauth.io/community/forum/post/5455</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5455</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 07 Sep 2022 08:30:32 GMT</pubDate></item><item><title><![CDATA[Reply to Claim not present in .Net on Tue, 06 Sep 2022 18:03:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/2017">@lionel-selosse</a></p>
<p dir="auto">Thanks for the information.</p>
<p dir="auto">I might need a bit more context, but it sounds like you are looking to store user identity information outside of a session.</p>
<p dir="auto">These two articles may be of initial interest, based on a google search.</p>
<ul>
<li><a href="https://andrewhalil.com/2020/09/14/role-retrieval-from-jwt-token-claims-in-net-core-applications/" rel="nofollow ugc">https://andrewhalil.com/2020/09/14/role-retrieval-from-jwt-token-claims-in-net-core-applications/</a></li>
<li><a href="https://andrewhalil.com/2022/08/09/how-to-retrieve-user-context-from-jwt-bearer-tokens-in-net-core/" rel="nofollow ugc">https://andrewhalil.com/2022/08/09/how-to-retrieve-user-context-from-jwt-bearer-tokens-in-net-core/</a></li>
</ul>
<p dir="auto">Let us know and we may be able to debug this a little bit further.</p>
<p dir="auto">Thanks,<br />
Josh</p>
]]></description><link>https://fusionauth.io/community/forum/post/5449</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5449</guid><dc:creator><![CDATA[joshua]]></dc:creator><pubDate>Tue, 06 Sep 2022 18:03:10 GMT</pubDate></item></channel></rss>