Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other Attributes of ClaimTypes is not working except for email and FullName #10850

Closed
TianMeds opened this issue Jan 20, 2025 · 4 comments
Closed
Labels
area-System.Security Issues related to security practices for .NET developers. needs-author-action An issue or pull request that requires more info or actions from the author. untriaged New issue has not been triaged by the area owner

Comments

@TianMeds
Copy link

Type of issue

Other (describe below)

Description

[Enter feedback here]
The claim types in my program is already working but only for the email, firstname and lastname only but when it comes to fetching the gender and the date of birth it returns null in the debugger

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.security.claims.claimtypes.gender?view=net-9.0#system-security-claims-claimtypes-gender

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Security.Claims/ClaimTypes.xml

Document Version Independent Id

d20f8037-8089-c669-e203-61245ca3dbd6

Article author

@dotnet-bot

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-System.Security Issues related to security practices for .NET developers. label Jan 20, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 20, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones

@bartonjs
Copy link
Member

I'm not entirely sure what your issue is about. Is there a sample that I'm not seeing that's not working, or did you mean to report it as a product bug instead of a documentation bug?

Assuming you're writing your own program and just exploring the space, and you're saying that identity.FindFirst(ClaimTypes.Gender) is returning null... that just means the claim wasn't present for the identity. You can see all of the claims by just enumerating identity.Claims

@bartonjs bartonjs added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 21, 2025
Copy link
Contributor

@TianMeds - This issue has been marked needs-author-action and might be missing some important information.

Copy link
Contributor

This issue has been automatically closed due to no response from the original author. Feel free to reopen it if you have more information that can help us investigate the issue further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security Issues related to security practices for .NET developers. needs-author-action An issue or pull request that requires more info or actions from the author. untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants