Skip to content
Merged
3 changes: 3 additions & 0 deletions .changes/unreleased/optimization-20251223-155633.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: optimization
body: Improve the error message to clearly indicate when the MPE creator does not have sufficient Azure permissions on the resource.
time: 2025-12-23T15:56:33.427481409Z
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from fabric_cli.core import fab_constant
from fabric_cli.core.fab_exceptions import FabricCLIError
from fabric_cli.core.hiearchy.fab_hiearchy import VirtualItem
from fabric_cli.errors import ErrorMessages
from fabric_cli.utils import fab_cmd_mkdir_utils as mkdir_utils
from fabric_cli.utils import fab_mem_store as utils_mem_store
from fabric_cli.utils import fab_ui as utils_ui
Expand Down Expand Up @@ -86,16 +87,19 @@ def exec(managed_private_endpoint: VirtualItem, args: Namespace) -> None:
# Wait exponentially
time.sleep(2**iteration)
iteration += 1
except Exception:
state = "Failed"
except Exception as exc:
if exc.status_code =='Forbidden' and exc.message == ErrorMessages.Common.forbidden():
Comment thread
aviatco marked this conversation as resolved.
Outdated
state = "Pending"
else:
state = "Failed"
break

if state != "Succeeded":
if state not in ["Succeeded", "Pending"]:
raise FabricCLIError(
f"Managed Private Endpoint was created on Fabric but encountered an issue on Azure provisioning. State: {state}",
fab_constant.ERROR_OPERATION_FAILED,
)
result_message = f"'{managed_private_endpoint.name}' created"
result_message = f"'{managed_private_endpoint.name}' created. {'Pending approval on Azure side' if state == 'Pending' else ''}"
Comment thread
aviatco marked this conversation as resolved.
Outdated

if params.get("autoapproveenabled", "false").lower() == "true":

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.2.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -26,15 +26,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '786'
- '1260'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 25 Sep 2025 09:13:42 GMT
- Tue, 23 Dec 2025 15:40:19 GMT
Pragma:
- no-cache
RequestId:
- 7eaee504-fac2-4c96-8e32-dbef7efe8bde
- 828ac25b-846e-4d51-968b-03ed0644dfca
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -60,7 +60,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.2.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -75,15 +75,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '786'
- '1260'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 25 Sep 2025 09:13:43 GMT
- Tue, 23 Dec 2025 15:40:26 GMT
Pragma:
- no-cache
RequestId:
- 695ed7dd-2104-488c-b0c0-845f91a5ca01
- 0c4f6251-ba88-4ca8-91f5-4d517abe2c93
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -109,7 +109,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.2.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/capacities
response:
Expand All @@ -125,15 +125,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '271'
- '874'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 25 Sep 2025 09:13:47 GMT
- Tue, 23 Dec 2025 15:40:32 GMT
Pragma:
- no-cache
RequestId:
- 6d155373-03fd-4f34-8d94-0820e30d54b1
- 24748e8c-f0de-4592-8dc6-99fafd5d0780
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -162,12 +162,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.2.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: POST
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"id": "d37f35bf-4dce-4291-9812-477382595e4b", "displayName": "fabriccli_WorkspacePerTestclass_000001",
string: '{"id": "dcd810a4-ac00-4552-9616-e21d6588bc17", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -177,17 +177,17 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '188'
- '187'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 25 Sep 2025 09:13:55 GMT
- Tue, 23 Dec 2025 15:40:41 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/d37f35bf-4dce-4291-9812-477382595e4b
- https://api.fabric.microsoft.com/v1/workspaces/dcd810a4-ac00-4552-9616-e21d6588bc17
Pragma:
- no-cache
RequestId:
- 9950b60b-464a-477d-a0ee-0c15c5cdf936
- e834830a-bd40-4dbb-8d41-4beda90ecb22
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -213,13 +213,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.2.0 (mkdir; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "d37f35bf-4dce-4291-9812-477382595e4b",
"My workspace", "description": "", "type": "Personal"}, {"id": "dcd810a4-ac00-4552-9616-e21d6588bc17",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
headers:
Expand All @@ -230,15 +230,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '820'
- '1290'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 25 Sep 2025 09:14:33 GMT
- Tue, 23 Dec 2025 15:44:02 GMT
Pragma:
- no-cache
RequestId:
- c1d25fd0-3982-4b9e-bf98-dc785f01a79d
- 031eb161-daa7-4243-87d6-dca967f707c0
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -264,9 +264,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.2.0 (mkdir; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/d37f35bf-4dce-4291-9812-477382595e4b/items
uri: https://api.fabric.microsoft.com/v1/workspaces/dcd810a4-ac00-4552-9616-e21d6588bc17/items
response:
body:
string: '{"value": []}'
Expand All @@ -282,11 +282,11 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 25 Sep 2025 09:14:34 GMT
- Tue, 23 Dec 2025 15:44:02 GMT
Pragma:
- no-cache
RequestId:
- 4faadd3b-1048-460e-9bc3-fc8be2360ac1
- 1b20a02f-599c-493d-9bd8-1836f2ace0c3
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -314,9 +314,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.2.0 (mkdir; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/d37f35bf-4dce-4291-9812-477382595e4b
uri: https://api.fabric.microsoft.com/v1/workspaces/dcd810a4-ac00-4552-9616-e21d6588bc17
response:
body:
string: ''
Expand All @@ -332,11 +332,11 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Thu, 25 Sep 2025 09:14:35 GMT
- Tue, 23 Dec 2025 15:44:03 GMT
Pragma:
- no-cache
RequestId:
- 5c18271d-3f2c-4a89-a672-d0707be7a579
- f9650d40-039d-424b-bf38-6dfaabff6e5d
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down
Loading
Loading