Skip to content

fix: Improve the error message shown when the MPE creator lacks Azure permissions - #98

Merged
aviatco merged 8 commits into
microsoft:mainfrom
aviatco:dev/aviatcohen/createMPEWithAzureNotAuthz
Dec 25, 2025
Merged

fix: Improve the error message shown when the MPE creator lacks Azure permissions#98
aviatco merged 8 commits into
microsoft:mainfrom
aviatco:dev/aviatcohen/createMPEWithAzureNotAuthz

Conversation

@aviatco

@aviatco aviatco commented Dec 23, 2025

Copy link
Copy Markdown
Collaborator

📥 Pull Request

✨ Description of new changes

🎯 Problem
When creating Managed Private Endpoints (MPE), if the MPE creator lacks sufficient Azure permissions to access the target Azure resource, the CLI would fail the entire operation instead of providing clear feedback and gracefully handling the scenario.

🔧 Solution
Enhanced error handling in the MPE creation flow to gracefully handle Azure permission issues and provide better user experience:

Key Changes:

Enhanced Exception Handling in fab_fs_mkdir_managedprivateendpoint.py:
Improved User Messaging:

Instead of failing, the CLI now sets the MPE state to "Pending" when Azure access is forbidden
Clear message indicating the MPE was created but requires approval: "'<mpe_name>' created. Pending approval on Azure side"
Comprehensive Test Coverage in test_mkdir.py:

Added test_mkdir_managed_private_endpoint_forbidden_azure_access_pending_success() test
Mocks Azure forbidden exceptions to verify proper handling
Validates that the operation succeeds with appropriate messaging

Behavior Changes:

Before
❌ Operation fails with Azure permission error
After
✅ xxx.ManagedPrivateEndpoint created. Pending approval on Azure side

@aviatco
aviatco requested a review from a team as a code owner December 23, 2025 16:02
@ayeshurun Alon Yeshurun (ayeshurun) changed the title fix: Improve the error message shown when the MPE creator lacks Azure perm… fix: Improve the error message shown when the MPE creator lacks Azure permissions Dec 23, 2025
Comment thread src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_managedprivateendpoint.py Outdated
Comment thread src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_managedprivateendpoint.py Outdated
@aviatco
aviatco merged commit 0e49777 into microsoft:main Dec 25, 2025
9 checks passed
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.

[FEATURE] Improve MPE creation experience when user lacks AuthZ on target Azure resource

2 participants