I’m excited to announce the release of Dynamic Redirect, a solution I built to solve a common frustration in organizations using Power Apps across multiple environments.

The Problem

If you’ve ever tried sharing a Power Apps URL, you know the pain:

https://apps.powerapps.com/play/e/8a46d3ce-793e-etc.../a/c877b27a-e163-4fd8-bddc-54ecc76ecd91

These unwieldy URLs are difficult to share, break in emails, and don’t give users any clue about which app or environment they’re accessing. When you add multiple environments (Dev, Test, Production) to the mix, managing these links becomes even more challenging.

The Solution

Dynamic Redirect is a lightweight Azure Function that transforms those complex URLs into something much more user-friendly:

https://apps.contoso.com/redirect?app_name=cip

Need a specific environment? Just add a prefix:

https://apps.contoso.com/redirect?app_name=TSTcip

The function intelligently routes users to the correct environment and application based on a simple JSON configuration file that maps short app names to their respective GUIDs.

Key Features

  • Environment Prefix Support: Easily target Dev, Test, or Production environments
  • Query Parameter Preservation: Additional parameters are passed through for deep linking
  • Performance Optimization: LRU caching minimizes overhead
  • Commercial and GovCloud Support: Works in both standard and government clouds
  • Robust Error Handling: Clear, actionable responses for users
  • Lightweight Implementation: A simple Python-based Azure Function with minimal dependencies

How It Works

At its core, the solution uses a JSON mapping file that correlates friendly app names with their environment-specific GUIDs:

{
  "EnvironmentGUIDs": {
    "PRD": "prod-environment-guid",
    "TST": "test-environment-guid",
    "DEV": "dev-environment-guid"
  },
  "Apps": {
    "cip": {
      "PRD": "c877b27a-e163-4fd8-bddc-54ecc76ecd91",
      "TST": "c877b27a-test-guid",
      "DEV": "c877b27a-dev-guid"
    }
  }
}

When a request comes in, the function:

  1. Extracts the app name and optional environment prefix
  2. Looks up the corresponding GUIDs in the configuration
  3. Constructs the proper Power Apps URL
  4. Redirects the user with a 302 response

Additional query parameters are preserved and passed through to the destination app, enabling deep linking to specific screens or records.

Real-World Impact

Since implementing Dynamic Redirect in our organization:

  • User experience has improved: Simpler URLs are easier to share and remember
  • Environment mistakes have decreased: Users no longer accidentally access the wrong environment
  • Communications have become cleaner: Links in documentation and emails are concise
  • Management is centralized: App configurations are managed in a single file

Get Started

The complete code and documentation are available on GitHub. The solution is designed to be easily deployable to your own Azure environment with minimal configuration.

Key implementation details and advanced usage scenarios are covered in the repository’s README, including:

  • Detailed setup instructions
  • Configuration examples
  • Request formats and response types
  • Performance considerations
  • Logging and monitoring

I built this tool to solve a specific pain point in our organization, and I’m excited to share it with the community. If you’re managing multiple Power Apps environments and looking for a simpler way to share app links, give Dynamic Redirect a try!