-
Notifications
You must be signed in to change notification settings - Fork 274
Description
azd version 1.23.6 (commit 16c72e7)
Walking through Quickstart: Deploy your first hosted agent - Microsoft Foundry | Microsoft Learn
-
AZURE_PRINCIPAL_ID missing — "Target Property can't be empty" — The Bicep role assignments require a principalId but it wasn't set in the azd environment. Fix: azd env set AZURE_PRINCIPAL_ID .
-
APPLICATIONINSIGHTS_RESOURCE_ID missing — "Target Property can't be empty" — The Bicep template had APPLICATIONINSIGHTS_CONNECTION_STRING set, which triggered the existing App Insights connection resource, but its target property (the resource ID) was blank. Fix: azd env set APPLICATIONINSIGHTS_RESOURCE_ID /subscriptions/.../appi-rukhcqx2j26yk.
-
azd deploykept asking forazd auth logindespite being logged in. I am not 100% sure but maybe I didn'tazd auth logout. (I didaz logoutthough to resolve the az not login to TME tenant issue.) To make sure nothing is cached, maybe good to say log out then log in again instead of just login?Root cause: The azd auth login session had a stale/corrupted cached token from a much earlier login (August 2025). Even though you ran azd auth login --tenant-id ... again, the old cached credential was interfering — the deploy step (which calls the Foundry Agent API, not just ARM) was picking up the expired token.
Fix: Run
azd auth logoutfirst to clear the stale cache, thenazd auth login --tenant-id ...fresh, thenazd deploy. The clean login produced a valid token that worked for both the ARM provisioning and the Foundry API deploy step.