Skip to content

fix: Improve RBAC setup reliability using FabricWorkspaceId for OneLake indexing (BYO support & enhanced logging)#141

Merged
Roopan-Microsoft merged 5 commits intomicrosoft:devfrom
Harmanpreet-Microsoft:dev
Apr 28, 2026
Merged

fix: Improve RBAC setup reliability using FabricWorkspaceId for OneLake indexing (BYO support & enhanced logging)#141
Roopan-Microsoft merged 5 commits intomicrosoft:devfrom
Harmanpreet-Microsoft:dev

Conversation

@Harmanpreet-Microsoft
Copy link
Copy Markdown
Contributor

@Harmanpreet-Microsoft Harmanpreet-Microsoft commented Apr 24, 2026

Purpose

This pull request improves the reliability of RBAC (Role-Based Access Control) setup for OneLake indexing by supporting direct use of the Fabric workspace ID, which is especially important for "bring your own" (BYO) workspace scenarios where the display name may not be unique or reliable. The changes ensure that the workspace ID is preferred and passed through all relevant scripts, reducing the risk of misconfiguration due to display name mismatches. Additionally, the logging and error messages have been enhanced to provide better diagnostics.

Fabric workspace identification and RBAC setup improvements:

  • The scripts now resolve and prefer the FabricWorkspaceId (if available) over the display name for RBAC assignment, supporting more robust and less error-prone workspace identification, especially in BYO scenarios. (01_setup_rbac.ps1, setup_ai_services_rbac.ps1) [1] [2] [3]
  • The FabricWorkspaceId is passed as a parameter to setup_ai_services_rbac.ps1 and used directly for role assignment, bypassing the need for a potentially fragile display name lookup. (01_setup_rbac.ps1, setup_ai_services_rbac.ps1) [1] [2] [3]
  • Improved logging to display both the Fabric workspace name and ID (when available), and enhanced error messages if the workspace is not found. (01_setup_rbac.ps1, setup_ai_services_rbac.ps1) [1] [2] [3]
  • The scripts now clearly log which workspace (by name or ID) the Contributor role is being assigned to, aiding in troubleshooting and auditability. (setup_ai_services_rbac.ps1) [1] [2]
  • The logic for resolving the workspace name and ID has been reorganized to prioritize environment variables and output values in a more logical and robust order. (01_setup_rbac.ps1)

These changes make the RBAC setup process more reliable and transparent, especially in complex or BYO workspace environments.

  • ...

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Harmanpreet-Microsoft and others added 4 commits April 20, 2026 12:54
- Add scripts/validate-prerequisites.ps1 to check tool versions, git
  submodules, Azure auth, azd environment config, subscription alignment,
  and Fabric/Purview feature readiness before deployment
- Add .env.example as a documented reference of all environment variables
  used by azd and infra/main.bicepparam (not auto-loaded by azd)
- Add docs/local_development.md with step-by-step local setup guide,
  deployment instructions, troubleshooting, and recommended first-run config
- Update .devcontainer/devcontainer.json with postCreateCommand to
  auto-init submodules and run prerequisite validation on container creation
- Update README.md to reference the new local development guide

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The RBAC script resolved workspace name from desiredFabricWorkspaceName
before FABRIC_WORKSPACE_NAME. In BYO mode these differ, causing the
Fabric API lookup to fail silently and skip the Contributor role grant.
The OneLake indexer then fails with 'access to the workspace was denied'.

Changes:
- 01_setup_rbac.ps1: Prefer FABRIC_WORKSPACE_NAME over
  desiredFabricWorkspaceName. Resolve FABRIC_WORKSPACE_ID and pass it.
- setup_ai_services_rbac.ps1: Accept -FabricWorkspaceId parameter.
  Use it directly for role assignment, skip displayName lookup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…elopment.md to origin/dev state

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Harmanpreet-Microsoft Harmanpreet-Microsoft changed the title fix: Enhance local development setup and fix RBAC issues fix: Improve RBAC setup reliability using FabricWorkspaceId for OneLake indexing (BYO support & enhanced logging) Apr 27, 2026
@Roopan-Microsoft Roopan-Microsoft merged commit 39f0ceb into microsoft:dev Apr 28, 2026
4 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants