Skip to content
Discussion options

You must be logged in to vote

Hi @iseneirik ! Thanks for the detailed report, and good instinct to compare against QueryAsync and TryGetAsync(subjectId). That made this easy to reproduce.

You're not holding it wrong. TryGetAsync(AttributeCode, object, ct) only works for attributes that are marked unique in the user profile schema. Under the hood it isn't a value search. It looks up a storage key, and those keys are only written for attributes whose definition has IsUnique = true. The built-in OidcStandardAttributes (Email, Name, PreferredUserName, ...) are all non-unique by default, which matches the OIDC spec. So there's never a key to find, and the call quietly returns null.

The API should make this much clearer. We…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@iseneirik
Comment options

@maartenba
Comment options

Answer selected by iseneirik
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Relates to a (potential) bug Follow-up Needs follow-up (for Duende use)
3 participants