Skip to content

[power-automate][Bug] FlowAgent ignores AZURE_CONFIG_DIR (shared ~/.azure); EnvironmentAccessDenied with no reconnect/reauth tool #434

Description

@ammulshergill

Plugin

power-automate

Plugin Version

2.5.0

Bug Description

FlowAgent authenticates via the Azure CLI (az account get-access-token) but rides the shared default ~/.azure profile and does not honour the AZURE_CONFIG_DIR environment variable. Two consequences:

  1. No per-tenant isolation. Teams that isolate multiple client tenants by pointing AZURE_CONFIG_DIR at separate profile directories (a common multi-tenant pattern) cannot scope FlowAgent to a specific tenant — it always uses whatever the shared default profile last logged into.
  2. No in-session recovery from a stale token. When the cached token is stale/invalid, FlowAgent operations fail with EnvironmentAccessDenied and there is no reconnect/reauth tool exposed to refresh it — the only remedy found was restarting the whole session.

Expected

  • Honour AZURE_CONFIG_DIR so the caller can scope FlowAgent to an isolated Azure CLI profile.
  • Expose a reconnect/reauth tool (or auto-refresh) so a stale token can be recovered without a full restart.

Environment

Windows; multiple Azure CLI profiles via AZURE_CONFIG_DIR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions