web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Deployment of power pa...
Power Pages
Unanswered

Deployment of power page as a solution

(0) ShareShare
ReportReport
Posted on by 57

Hi Everyone,

I am using Enhanced data model of power page and adding site in a solution for migration from DEV instance to UAT and PROD,
and I am moving the solution as a managed solution.

After Deployment of solution in UAT instance, I've to change some code in it like power automate (HTTP Request) URL, Site URL for web API calling and some azure function url and client secret ID.

1- On changing of these url in managed solution it will create solution layer and affect our next deployment ?
2- Is is any better approach to make our deployment dynamic that we don't have to change these URL in Target Environment.

Thanks.

Categories:
I have the same question (0)
  • Lucas001 Profile Picture
    2,429 Super User 2025 Season 2 on at

    Hi @_Mayank,

     

    generally speaking, I would say it's the best approach using pipelines.

    By depoying a new managed solution the old unmanaged layer is over written.

    Have a look here: https://learn.microsoft.com/en-us/power-platform/alm/solution-layers-alm

     

    I unfortunately haven't found a simpler solution for now. Any other tip is highly appreciated.

     

  • _Mayank Profile Picture
    57 on at

    Hi @Lucas001,
    I always have to make changes in my code after the deployment of solution like power page site url, http request url, client id etc.
    After changing all these code of line in manged solution it will create layer , is there any solution to avoid changes in code after deployment? Thats what I am asking.

  • Lucas001 Profile Picture
    2,429 Super User 2025 Season 2 on at

    Hi @_Mayank,

     

    no as the new deployment will always overwrite the last changes.

    One approach we are currently checking are global variables. Within those you could store the link, url etc. as the environment variable can be set per environment, it's something what could work. But we are still testing it right now.

  • _Mayank Profile Picture
    57 on at

    Hi @Lucas001 ,
    If you find any solution, please provide it.
    Thanks!

  • Lucas001 Profile Picture
    2,429 Super User 2025 Season 2 on at

    Hi @_Mayank , 

    I reached out to the MVP Nicholas Hayduk and got a tip on how to do things.

     

    Power Pages doesn't have any specific support for environment variables (i.e. there is no simple way to access them via Liquid or JS). Probably the most common way of doing it would be to use Site Settings. Create the site setting in each environment that has the correct value. Then ensure that the site setting is not part of the ALM process (so that it doesn't get overwritten from DEV). This will depending on what you're using for ALM. If using configuration migration tool, use fetchxml queries to ensure that site setting isn't included. If you're using the new enhanced data model and solution, ensure that the site setting isn't included in the solution. If you're using the PAC CLI, use deployment profiles (https://powerapps.microsoft.com/en-us/blog/power-apps-portals-create-deployment-profile-for-dev-test-prod-environment-using-power-apps-cli/).


    --------------------------------------------------------------------------------------

    Hope that helps.

    If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.

     

  • _Mayank Profile Picture
    57 on at

    Thanks, @Lucas001 , for the solution!

    I tried using Site Setting before, but it ended up getting included in my solution. Then, after deployment, I had to change those values, which caused issues with my solution.

    I appreciate your suggestion, and I'll give it a try.

  • Lucas001 Profile Picture
    2,429 Super User 2025 Season 2 on at

    Hi @_Mayank,

     

    did you achieve some results?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 70 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard