Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.
This repository was archived by the owner on Jun 29, 2025. It is now read-only.

🐛 Bug Report: azure ad oauth fails "can't get email from this user" when no email claim is sent #825

@adi8ya

Description

@adi8ya

👟 Reproduction steps

this is my first time doing this so please bear with me

  1. create a user in azure without exchange license assigned
  2. resulting in user not having an email property (or blank)
  3. try to login to pingvin with that email
  4. error - can't get email for that user

👍 Expected behavior

expected behaviour is that pingvin should be able to fetch the "email id" (i.e, abc@xyz.com) from preferred_username that is recived in the token (for a user with no exchange license email will be blank but the id is passed in preferred_username) and pingvin should be able to use that to create id

👎 Actual Behavior

actual behaviour is pingvin not being able to extract "email id" from other claims even if the email claim is not present

i am happy to be prove wrong, but please help me look into this. because i was racking my brain for 2 hours, i know very little about how oauth backend works,
as soon i tried with a user that has email id present, pingvin auth fine.

📜 Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions