ory / ory/polis

OIDC Connection: Missing profile email in /api/oauth/userinfo endpoint

Open
#3,916 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
2.3k
Forks
233
PR merge metrics
No merged PRs in 30d

Description

Found a bug? Please fill out the sections below. 👍

Issue Summary

We attempted to connect to the OIDC provider (Entra in our case). The response from api/oauth/userinfo does not provide the email attribute. After some debugging, we found that the email is parsed from the Entra user's Contact information attribute, but only if it is present. We are unsure if this is the expected behavior. The email in the contact information in Entra is not filled out by default, and there is also the possibility to add multiple emails.

Image

Steps to Reproduce
  1. Create connection in jackson dashboard
  2. Select OIDC and provide all necessary fields to entra OIDC
  3. try to use API

Expected behaviour could be, that email should be parsed properly from user in that case. Because entra user is having email and not need to be provided in entra users contact information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the /api/oauth/userinfo endpoint and its OIDC profile mapping, focusing on how Entra user email data is selected. Compare the available Entra email attributes and verify the expected response for users without Contact information; done means the endpoint returns the appropriate email consistently and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
api, authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.