How to Return to the Previous SharePoint Page After Closing a Power Apps App
Question details
The user needs to navigate back to the exact SharePoint page they visited prior to launching a Power Apps application, avoiding the use of hardcoded destination URLs.

- Product
- Microsoft Power Apps and SharePoint
- Device & OS
- not provided
- Scenario
- Managing seamless user navigation between a SharePoint site and an integrated or standalone Power Apps application.
- Observed behavior
- Seeking a dynamic method to capture the referring SharePoint URL and trigger a return navigation action when the Power Apps session concludes.
Ensure you have edit access to your Power Apps application and understand basic Power Fx formulas, specifically how to handle query parameters.
Pass the Source URL as a Parameter to Power Apps
Dynamically pass the originating SharePoint URL to Power Apps so the application knows exactly where to redirect the user upon closing.
By modifying the launch link in SharePoint, you can append the current page's URL as a query parameter. Power Apps can then read this parameter during startup and use it to navigate the user back when they are finished.
Edit the link or button in SharePoint that launches your Power App. Append a query string parameter to the App URL, for example: ?tenantId=...&source=YOUR_SHAREPOINT_PAGE_URL.
Open your application in Power Apps Studio. Select the 'App' object from the Tree view and locate the 'OnStart' property.
In the OnStart property, add the formula: Set(varSourcePage, Param("source")). This captures the SharePoint URL passed through the link.
Select the 'Close' or 'Exit' button in your app. Change its 'OnSelect' property to use the Launch function: Launch(varSourcePage). This redirects the user back to the dynamic SharePoint page.

Consult the Power Apps Community for Advanced Referral Handling
If your Power App is embedded via a SharePoint Web Part rather than a standalone link, custom referral-page handling may be required.
Looking for a Simpler Office Experience? Try WPS Office
While managing complex workflows and app integrations in SharePoint and Power Apps requires advanced technical configuration, WPS Office provides a streamlined, user-friendly experience for your daily document, spreadsheet, and presentation needs. Emphasizing free access, lightweight performance, and high compatibility, it requires zero learning curve for users migrating from Microsoft Office.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded file and follow the simple on-screen instructions to set up the suite on your device.
- 3. Open Your Documents: Launch WPS Office and open your existing Microsoft Office files directly, preserving all your original formatting and layouts.

Frequently Asked Questions
Can I use the Back() function in Power Apps to return to SharePoint?
No, the Back() function in Power Fx only navigates to the previous screen within the Power Apps application itself. It cannot control browser history or navigate back to an external SharePoint page.
How do I dynamically generate the source URL in SharePoint?
You can use SharePoint JSON column formatting or dynamic links in a list web part to automatically append the current item's or page's URL to the Power Apps launch link as a query string parameter.
Does the Launch() function close my Power Apps session?
Using the Launch() function redirects the browser to the specified URL. If you are launching in the same tab (by specifying LaunchTarget.Replace), the Power Apps session effectively ends as the browser navigates away from the app.




