Skip to content

Fix Foundry deployment + Foundry User RBAC and add portal links (Inventory Planning Fabric hack) - #478

Merged
Marco Weber (qxsch) merged 3 commits into
microsoft:mainfrom
Digvijay:fix/fabric-inventory-foundry-deploy
Sep 3, 2026
Merged

Marco Weber (qxsch) merged 3 commits into
microsoft:mainfrom
Digvijay:fix/fabric-inventory-foundry-deploy

Conversation

@Digvijay

Copy link
Copy Markdown

What & why

Testers of the low-code Inventory Planning with Microsoft Fabric hack (added in #387) reported that the Foundry project wasn't being set up correctly by the deployment pipeline and that Foundry user RBAC was missing — so Challenge 1 couldn't be completed and attendees couldn't build/test agents. This PR fixes the deployment and improves the attendee experience.

Changes

1. Fix Foundry project provisioning + RBAC — labautomation/deploy-lab.ps1

  • Create the Foundry project with a system-assigned managed identity and fail clearly on REST/provisioning errors, waiting until it reaches Succeeded with a principalId (previously fire-and-forget — it could report success even on failure).
  • Grant the Foundry User role at the Foundry account scope to each attendee and to the project managed identity (idempotent, with retries for AAD propagation). Previously no Foundry access was granted.
  • Require at least one attendee object ID.

2. Document cold-capacity schema-sync behaviour — challenges/challenge-01.md

  • On a freshly provisioned F2 the Lakehouse SQL analytics endpoint can lag the notebook's poll window, so the publish cell may raise No tables were selected (schema may still be syncing) and the portal may show Error updating data agent data source selection(s). Added an explanatory note after Run all plus two troubleshooting rows (confirm tables via the SQL analytics endpoint, then re-run the publish cell or tick tables + Publish).

3. Emit clickable portal links to the dashboard — labautomation/deploy-lab.ps1, labautomation/README.md

  • FoundryProjectUrl — deep-link straight to the attendee's inventory-hack project in ai.azure.com (built deterministically from subscription/RG/account/project/tenant).
  • FabricPortalUrl — link to app.fabric.microsoft.com to create the workspace on the attendee's capacity (the workspace URL itself can't exist until the attendee creates it in Challenge 1).

Validation (live)

  • Ran the full deploy-lab.ps1 against a real subscription: Foundry account, project (with managed identity), gpt-5.4-mini model deployment, and Fabric F2 capacity all provisioned Succeeded; Foundry User granted to attendee + project MI.
  • Completed Challenge 1's backend end-to-end: created the workspace + Lakehouse, ran the setup notebook, published the inventory-hack-agent Data Agent, and confirmed it answers correctly (Portland/Seattle on-hand stock with CRITICAL flags).
  • Verified the generated FoundryProjectUrl matches the real portal URL byte-for-byte.
  • Confirmed the Foundry User role's Microsoft.CognitiveServices/* data action covers both agent CRUD and inference, so the portal Build an agent flow is enabled without an extra role.

Builds on #387.

Digvijay Chauhan and others added 3 commits September 3, 2026 00:04
…hack)

The Fabric inventory-planning deploy-lab.ps1 created the Foundry project without a managed identity, ignored REST/provisioning failures (reporting success even on error), and never granted attendees access to Foundry - so Challenge 1 could not be completed and Foundry user RBAC was missing.

- Create the project with a system-assigned managed identity and fail clearly on PUT/provisioning errors, waiting until it reaches Succeeded with a principalId.

- Grant the Foundry User role at the Foundry account scope to each attendee and to the project managed identity, idempotently with retries.

- Require at least one attendee object ID and document the new RBAC behaviour.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On a freshly-provisioned F2 capacity the Lakehouse SQL analytics endpoint can take a couple of minutes to expose newly-written tables. The setup notebook's publish cell may raise 'No tables were selected (schema may still be syncing)' and the data agent portal may show 'Error updating data agent data source selection(s)' if tables are ticked too early. Both resolve once the schema syncs.

Add an explanatory note after Run all and two troubleshooting rows so participants understand the behaviour and know to confirm tables via the SQL analytics endpoint, then re-run the publish cell or tick tables and Publish.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d (Fabric hack)

The deploy previously returned only the Foundry SDK endpoint and the Fabric capacity name, so the MicroHack platform dashboard had no clickable link to the attendee's Foundry project or the Fabric portal - attendees had to navigate manually.

- Add FoundryProjectUrl: a deep-link straight to the attendee's inventory-hack project in ai.azure.com, built deterministically from the subscription (base64url token), resource group, account, project, and tenant.

- Add FabricPortalUrl: a link to app.fabric.microsoft.com to create the workspace on FabricCapacityName (the workspace URL cannot exist until the attendee creates it in Challenge 1).

- Document both new credentials in labautomation/README.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Digvijay
Digvijay (Digvijay) force-pushed the fix/fabric-inventory-foundry-deploy branch from bfc064c to 963b827 Compare September 2, 2026 22:06
@qxsch
Marco Weber (qxsch) merged commit fd2a5ff into microsoft:main Sep 3, 2026
2 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.

2 participants