Skip to content

Fix crash rendering sign-in page when only AAD B2C is configured#2883

Open
SAY-5 wants to merge 1 commit into
Azure:masterfrom
SAY-5:fix-signin-social-aad-tenants-guard
Open

Fix crash rendering sign-in page when only AAD B2C is configured#2883
SAY-5 wants to merge 1 commit into
Azure:masterfrom
SAY-5:fix-signin-social-aad-tenants-guard

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 20, 2026

Copy link
Copy Markdown

Problem: Publishing the portal (or rendering the Sign-in page) crashes with TypeError: Cannot read properties of undefined (reading 'allowedTenants') when only an AAD B2C identity provider is configured. SigninSocialViewModelBinder.modelToState reads aadIdentityProvider.allowedTenants before the if (aadIdentityProvider) guard, so it throws whenever no plain AAD provider is present.

Solution: Move the tenants lookup inside the existing if (aadIdentityProvider) block so it only runs when the provider exists. No behavior change when an AAD provider is configured.

Fixes #2874

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5
SAY-5 force-pushed the fix-signin-social-aad-tenants-guard branch from 59e018c to 99c938a Compare July 20, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read properties of undefined (reading 'allowedTenants')

1 participant