Skip to content

[Issue] Quickstart: Deploy your first hosted agent - Microsoft Foundry-issue when azd up #6938

@puicchan

Description

@puicchan

azd version 1.23.6 (commit 16c72e7)

Walking through Quickstart: Deploy your first hosted agent - Microsoft Foundry | Microsoft Learn

  1. 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 .

  2. 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.

  3. azd deploy kept asking for azd auth login despite being logged in. I am not 100% sure but maybe I didn't azd auth logout. (I did az logout though 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 logout first to clear the stale cache, then azd auth login --tenant-id ... fresh, then azd deploy. The clean login produced a valid token that worked for both the ARM provisioning and the Foundry API deploy step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ext-agentsazure.ai.agents extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions