Hello @Ivan Petrovic,
Thank you for posting your query on Microsoft Q&A.
Based on your description, I understand that in your Azure AD B2C tenant, you are inviting users from Entra ID who are internal employees. However, they are unable to sign in using their email addresses when accessing the endpoint https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize
. They are only able to log in using their User Principal Name (UPN).
To enable login with an email address for your Azure AD B2C applications, you should send the token request to the endpoint: https://<tenant-name>.b2clogin.com/<tenant-name>.onmicrosoft.com/<policy-name>/oauth2/v2.0/authorize? instead of https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize. Please test this configuration and let me know if the issue persists.
For Entra ID tenants, if you want to enable sign-in with email addresses, this feature can be activated by setting the AlternateIdLogin attribute in the HomeRealmDiscoveryPolicy. You can refer to our documentation for detailed steps on how to configure this for your organization.
I hope this information is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Thanks,
Raja Pothuraju.