Skip to content

[power-automate][Bug] FlowAgent: all flow operations fail with ENOTFOUND when the per-environment *.environment.api.powerplatform.com endpoint is not provisioned #271

Description

@JohanLexAdapt

Summary

All FlowAgent flow operations (list_flows, get_flow, create_flow, run history, etc.) fail with DNS ENOTFOUND for our environment, because the plugin builds every flow URL on the per-environment Power Platform API hostname ({hex}.{shard}.environment.api.powerplatform.com) — and that hostname does not exist for our environment. Environments without a provisioned per-environment PPAPI endpoint appear to be entirely unsupported.

Environment details

  • Plugin: power-automate@power-platform-skills v2.0.0 (Claude Code, Windows 11)
  • Environment: Default-64111bfd-01e4-4900-a89b-7cf35a77224c (default environment, europe region, created 2023-12)
  • environmentFlowHostingType: SelfHostMultiTenant
  • is100PercentSolutionFlows: false
  • Dataverse: linked and Ready (crm4)
  • Flow runtime endpoint per Microsoft.ProcessSimple environment record: https://emea.api.flow.microsoft.com

Repro

  1. az login --tenant <tenant> --allow-no-subscriptions (works)
  2. list_environments → succeeds (classic BAP/Flow RP route)
  3. set_current_env → succeeds
  4. list_flows → fails:
Flow API 0 NetworkError: Network request failed: ENOTFOUND
(hostname: 64111bfd01e44900a89b7cf35a7722.4c.environment.api.powerplatform.com)

Diagnosis

  • The derived hostname 64111bfd01e44900a89b7cf35a7722.4c.environment.api.powerplatform.com does not exist in DNS — verified against Google (8.8.8.8) and Cloudflare (1.1.1.1) resolvers, so it is not a local DNS problem. The hostname derivation itself (strip Default-, remove hyphens, dot before last two chars) matches the documented PPAPI pattern; the endpoint has simply never been provisioned for this environment.
  • The tenant-level island endpoint (64111bfd01e44900a89b7cf35a7722.4c.tenant.api.powerplatform.com) does resolve, but serves neither /environments/{envId}/powerautomate/... (404) nor /powerautomate/... (401) paths.
  • The classic Flow RP API works perfectly for the same environment and credentials: GET https://emea.api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/Default-64111bfd-01e4-4900-a89b-7cf35a77224c/flows?api-version=2016-11-01 returns our flows.
  • PA_PPAPI_BASE_URL / PA_PPAPI_SUFFIX cannot work around this, because the /powerautomate/... path segments are appended after the templated base and no reachable host serves those paths for this environment.

Request

Fall back to the classic Flow RP API ({flowBaseUrl}/providers/Microsoft.ProcessSimple/environments/{envId}/...) when the per-environment PPAPI hostname does not resolve — the plugin already uses Flow RP for environment listing and admin operations, so the plumbing exists. Alternatively, document the limitation and which environments are expected to have the per-environment endpoint.

Happy to provide more diagnostics from this tenant if useful.


Diagnosed with Claude Code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions