Free tools Windows power users keep installed
One-click scans. No signup required.
Yes—you can pass a URL query parameter to a Power Apps Code App. The twist is that receiving the parameter does not automatically open a screen or record: your app must read the value and use its own routing or view-selection logic.
How Code App deep linking works
A Code App is a code-first web application that can use frameworks such as React or Vue while integrating Power Apps capabilities. Its SDK exposes launch context through getContext(), including URL query parameters at context.app.queryParams. Your code decides what those parameters mean and what view to show. Microsoft’s context documentation describes the API, and Microsoft’s PowerAppsCodeApps repository includes a Dataverse context-routing sample.
Build a link with an app-defined parameter
Microsoft documents this Code App play URL shape for embedding:
https://apps.powerapps.com/play/e/{environmentId}/app/{appId}?tenantid={tenantId}
#1 Best Overall
The tenant parameter is optional in that embedding guidance. To pass a record identifier, append an application-owned parameter such as recordId:
https://apps.powerapps.com/play/e/{environmentId}/app/{appId}?tenantid={tenantId}&recordId={encoded-id}
If the base URL has no query string, start one with ?recordId=... instead. Encode the value as appropriate for a URL. recordId is an example key your app defines, not a reserved Code Apps route format. The documented play URL and embedding requirements are in Microsoft’s iframe embedding guide.
Read the parameter and route deliberately
The SDK call is asynchronous. A minimal illustrative shape is:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #3
import { getContext } from '@microsoft/power-apps/app';
const context = await getContext();
const recordId = context.app.queryParams.recordId;
// Validate the supplied ID, then pass it to your app's router or view logic.
This shows how to obtain the value; it is not a complete app or a tested implementation. Microsoft’s context documentation also describes other returned context, including app and environment identifiers, Dataverse organization URL, app URL, user metadata, and session ID. Treat a query parameter as untrusted input: validate and normalize it, then use your existing data layer and authorization checks. A record ID in a URL is a navigation hint, not permission to access that record.
Choose how the app responds
There is no single built-in Code Apps route table implied by the query-parameter accessor. Your architecture determines how the value selects a destination.
Rank #4
| Approach | Useful when | Engineering considerations |
|---|---|---|
| Use the app’s router | The app already has routes or needs nested destinations. | Integrate the parameter with the router’s route and data-loading logic. History, refresh behavior, and route setup depend on the framework and app implementation. |
| Select an initial view in app state | The app has a small number of views and does not need a full route system. | Read the parameter at startup, validate it, and select an allowed view. Refresh and browser-history behavior must be designed if the selected view needs to persist. |
Microsoft’s repository contains both a DataverseContextRouting sample for selecting an initial Dataverse page from query parameters and a TanStack Router sample. These are examples, not a Microsoft ranking of approaches or a guarantee about deployment behavior. Check the samples in the repository against your app’s framework and needs.
Code Apps and canvas-app deep links are different
Canvas apps have a separate deep-link pattern using the formula functions Param() and StartScreen. Those instructions are for canvas apps, not the Code Apps SDK. For a Code App, read query parameters from getContext() and connect them to your own routing or view logic. See Microsoft’s canvas app deep-link tutorial for that distinct approach.
Best Value
Keep platform URL options separate from app navigation
Microsoft documents hideNavBar=true as a play-URL option to hide the Power Apps header. It changes platform chrome, not the app’s selected page or record. When the URL already has a query string, append the option with &. Details are in Microsoft’s Code Apps system configuration documentation.
Test the link in its actual launch context
Test the published play URL with the parameter present and absent, and verify that invalid or missing values produce a safe, useful result. If the app is embedded, test from the intended host as well: the embedding guide says access is limited to Power Apps users in the same tenant, and an external host may require an administrator to configure the environment’s CSP frame-ancestors directive. Refresh and browser-history behavior are app implementation details; do not assume every host preserves a custom route automatically.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




