Describe the bug
It is not possible to reliably use two connections of the same connector type HTTP with Microsoft Entra ID (preauthorized) (shared_webcontents) in a single Power Apps Code Apps project.
Even when two connectionReferences are configured with different sharedConnectionId values, runtime requests are effectively routed through one connection, causing one integration path to fail (or use the wrong connection).
This blocks multi-scope scenarios such as:
- SharePoint + Power Automate
- SharePoint + Microsoft Graph
- Power Automate + Microsoft Graph
Steps to Reproduce
- Create a Power Apps Code Apps project.
- Add two connection references in
power.config.json for shared_webcontents, each with a different sharedConnectionId.
- Use both references in the app for different targets (for example SharePoint and Power Automate).
- Trigger
InvokeHttp requests for both targets.
- Inspect request path/runtime behavior and observe that one connection is consistently used.
Expected behavior
Both connector connections should be independently usable in the same app, with stable routing per connection reference/data source.
Actual behavior
Requests are effectively bound to one connection for shared_webcontents; the second integration path is routed with the wrong connection.
Screenshots or Error Messages
Example of request path observed for wrong routing:
/connectors/runtime/invoke/scaleGroups/firstrelease/shards/06/apis/webcontents/connections/<connection-id>/codeless/InvokeHttp
In our case, one scenario expected ba7a5eba6dc94b1e82c3cba632f1868b but runtime used 48e70e68bd8e4bcfbc18077433c2a0be (or vice versa depending on mapping).
Environment information
- Framework, build tool or relevant package used: React + Vite (Power Apps Code Apps)
- Any connection/components: Dataverse, Office 365 Users, HTTP with Microsoft Entra ID (preauthorized)
- OS: Windows
Additional context
Workaround found
We manually created a dedicated logical data source alias per target, for example:
webcontents (one connection)
webcontents_flow (second connection)
Then we:
- Mapped aliases in
power.config.json under connectionReferences[].dataSources.
- Added matching datasource entries in
.power/schemas/appschemas/dataSourcesInfo.ts.
- Routed calls in app code by datasource alias (SPO alias vs Flow/Graph alias).
What this workaround enables
With this setup we can:
- Use SharePoint APIs with full user context (delegated context of the signed-in user).
- Execute authenticated HTTP calls to Power Automate endpoints.
- Execute authenticated HTTP calls to Microsoft Graph.
Limitation of workaround
This workaround is not durable:
- It gets reset/overwritten when adding a new datasource (for example after
pac code add-data-source).
- Manual alias/schema changes must be reapplied.
Requested fix
Please support stable multi-connection usage for shared_webcontents by:
- Generating and preserving distinct datasource aliases per connection reference.
- Keeping mappings stable across
pac code add-data-source and regeneration.
- Documenting the recommended approach for multi-scope usage (SharePoint, Power Automate, Graph).
Describe the bug
It is not possible to reliably use two connections of the same connector type HTTP with Microsoft Entra ID (preauthorized) (
shared_webcontents) in a single Power Apps Code Apps project.Even when two
connectionReferencesare configured with differentsharedConnectionIdvalues, runtime requests are effectively routed through one connection, causing one integration path to fail (or use the wrong connection).This blocks multi-scope scenarios such as:
Steps to Reproduce
power.config.jsonforshared_webcontents, each with a differentsharedConnectionId.InvokeHttprequests for both targets.Expected behavior
Both connector connections should be independently usable in the same app, with stable routing per connection reference/data source.
Actual behavior
Requests are effectively bound to one connection for
shared_webcontents; the second integration path is routed with the wrong connection.Screenshots or Error Messages
Example of request path observed for wrong routing:
/connectors/runtime/invoke/scaleGroups/firstrelease/shards/06/apis/webcontents/connections/<connection-id>/codeless/InvokeHttpIn our case, one scenario expected
ba7a5eba6dc94b1e82c3cba632f1868bbut runtime used48e70e68bd8e4bcfbc18077433c2a0be(or vice versa depending on mapping).Environment information
Additional context
Workaround found
We manually created a dedicated logical data source alias per target, for example:
webcontents(one connection)webcontents_flow(second connection)Then we:
power.config.jsonunderconnectionReferences[].dataSources..power/schemas/appschemas/dataSourcesInfo.ts.What this workaround enables
With this setup we can:
Limitation of workaround
This workaround is not durable:
pac code add-data-source).Requested fix
Please support stable multi-connection usage for
shared_webcontentsby:pac code add-data-sourceand regeneration.