Skip to content

fix(ui): add fallback to interaction required error in MsalAuthenticator#27189

Merged
pmbrull merged 2 commits intomainfrom
fix-safar-msal-auth
Apr 9, 2026
Merged

fix(ui): add fallback to interaction required error in MsalAuthenticator#27189
pmbrull merged 2 commits intomainfrom
fix-safar-msal-auth

Conversation

@chirag-madlani
Copy link
Copy Markdown
Collaborator

@chirag-madlani chirag-madlani commented Apr 9, 2026

renewIdToken in MsalAuthenticator would propagate InteractionRequiredAuthError when silent token acquisition failed, instead of attempting an interactive popup fallback. The test suite also asserted this broken behavior.

Changes:

  • MsalAuthenticator.tsx: renewIdToken now calls fetchIdToken(true), enabling the InteractionRequiredAuthErrorloginPopup fallback path instead of throwing immediately.
  • MsalAuthenticator.test.tsx:
    • Replaced the stale test that expected renewIdToken to throw InteractionRequiredAuthError with two new cases:
      • Silent failure → popup succeeds → token returned
      • Silent failure → popup also fails → error propagates
    • Added missing mocks for showErrorToast, Transi18next, and getPopupSettingLink (used in the popup error-handling branch)

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

Copilot AI review requested due to automatic review settings April 9, 2026 04:43
@chirag-madlani chirag-madlani added the To release Will cherry-pick this PR into the release branch label Apr 9, 2026
@github-actions github-actions bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the UI’s MSAL authenticator token renewal path so that when silent token acquisition fails with InteractionRequiredAuthError, renewIdToken will allow an interactive popup fallback instead of immediately failing.

Changes:

  • Updated renewIdToken to call fetchIdToken(true) to enable popup fallback behavior during token renewal.

Copilot AI requested a review from a team as a code owner April 9, 2026 05:01
Copilot AI changed the title fix(ui): add fallback to interaction required error fix(ui): add fallback to interaction required error in MsalAuthenticator Apr 9, 2026
@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 9, 2026

Code Review ✅ Approved

Adds fallback handling for interaction required errors in MsalAuthenticator to improve error resilience in the UI authentication flow. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 64%
64.27% (59556/92656) 43.76% (31031/70904) 46.94% (9363/19943)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@pmbrull pmbrull merged commit af7ffe7 into main Apr 9, 2026
44 of 45 checks passed
@pmbrull pmbrull deleted the fix-safar-msal-auth branch April 9, 2026 07:13
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Failed to cherry-pick changes to the 1.12.5 branch.
Please cherry-pick the changes manually.
You can find more details here.

chirag-madlani added a commit that referenced this pull request Apr 9, 2026
…tor (#27189)

* fix(ui): add fallback to interaction required error

* fix(ui): update MsalAuthenticator test to validate popup-fallback path

Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6

Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
(cherry picked from commit af7ffe7)
chirag-madlani added a commit that referenced this pull request Apr 9, 2026
…tor (#27189)

* fix(ui): add fallback to interaction required error

* fix(ui): update MsalAuthenticator test to validate popup-fallback path

Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6

Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
(cherry picked from commit af7ffe7)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

🟡 Playwright Results — all passed (23 flaky)

✅ 3138 passed · ❌ 0 failed · 🟡 23 flaky · ⏭️ 205 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 2 637 0 5 32
🟡 Shard 3 649 0 2 26
🟡 Shard 4 618 0 4 47
🟡 Shard 5 604 0 3 67
🟡 Shard 6 630 0 9 33
🟡 23 flaky test(s) (passed on retry)
  • Features/DataProductPersonaCustomization.spec.ts › Data Product - customization should work (shard 2, 1 retry)
  • Features/DataQuality/BundleSuiteBulkOperations.spec.ts › Add test case to existing Bundle Suite (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseIncidentPermissions.spec.ts › User with only VIEW cannot PATCH incidents (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with TEST_CASE.EDIT_ALL can see edit action on test case (shard 2, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Flow/ExploreDiscovery.spec.ts › Should display deleted assets when showDeleted is checked and deleted is not present in queryFilter (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for DashboardDataModel (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with deeply nested subdomains (3+ levels) verifies FQN propagation (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Multiple consecutive domain renames preserve all associations (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/ExploreTree.spec.ts › Verify Database and Database Schema available in explore tree (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Add and Remove Assets (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary Bulk Import Export (shard 6, 1 retry)
  • Pages/HyperlinkCustomProperty.spec.ts › should display URL when no display text is provided (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Stored Procedure (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Api Endpoint (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/ProfilerConfigurationPage.spec.ts › Non admin user (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

SaaiAravindhRaja pushed a commit to SaaiAravindhRaja/OpenMetadata that referenced this pull request Apr 12, 2026
…tor (open-metadata#27189)

* fix(ui): add fallback to interaction required error

* fix(ui): update MsalAuthenticator test to validate popup-fallback path

Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6

Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
SaaiAravindhRaja pushed a commit to SaaiAravindhRaja/OpenMetadata that referenced this pull request Apr 12, 2026
…tor (open-metadata#27189)

* fix(ui): add fallback to interaction required error

* fix(ui): update MsalAuthenticator test to validate popup-fallback path

Agent-Logs-Url: https://github.com/open-metadata/OpenMetadata/sessions/b430d4e3-eead-4b95-9b4e-0b6775ca20e6

Co-authored-by: chirag-madlani <12962843+chirag-madlani@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants