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 / Best Practices for Pow...
Power Pages
Unanswered

Best Practices for Power Pages/Portals development with CLI

(0) ShareShare
ReportReport
Posted on by 323

Hi all,

So, I've been using the Power Platform CLI for some time now for portal development, but it feel like, if your developing for multiple environments or if you open a new portal and forget to change your authentication profile to the new instance things could get bad really quick. I mean, with source control everything is recoverable, worst case you delete the portal and re-upload or just restore a backup if it's really that far gone.

But still, I'm curious to know what do you guys think the best practices are for portal development using CLI, I've seen a few articles but (maybe I'm not searching correctly) I don't find a lot around dev best practices.

So yeah, would be interesting to learn of tools or techniques people use to deal with this type of development.

Categories:
I have the same question (0)
  • eugenevanstaden Profile Picture
    441 on at

    @joaodsantos 

    I usually work with CLI only in Dev environment and deploy to target environments via ADO Pipeline. I also include all my customizations required for my portal in a single solution (forms, views, code etc) - and then deploy this Solution first and then portal config 2nd. 

    My process:
    1. unpack solution + portal config (increment version)
    2. Commit to repo
    3. Pull request 
    4. Deploy.

    My stage names match my deployment profiles. Prior to CLI i did the same just with Config migration.

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @joaodsantos 

    I use the Portal Build tool from Arpit. Link below 

     

    https://marketplace.visualstudio.com/items?itemName=arpitdynamics-powerguide.PortalToolInstaller 

     

    https://arpitpowerguide.wordpress.com/2021/12/15/powerapps-portals-build-tools-automate-portal-deployment/ 

     

    It was super useful to switch between deployment profiles. 

     

    Hope it helps. 
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

  • João Santos Profile Picture
    323 on at

    Hi, thanks both for the comment

    @ragavanrajan  thanks for the links, yes I used Arpit's tools until very recently, with v2 of Power Platform Build Tools I'm trying to switch to using those and see if it offers the same functionality. Arpit has quite a few resources on portal's best practices, in fact I think his stuff was the first one I came across a couple of years ago when looking at best practices, not to do with CLI overall but still useful (this and this)

     

    @eugenevanstadenyes, that's a very similar approach to how I work. Use the tool for dev and deploy using pipelines wherever possible. I was just curious if there was some tool around that managed some sort of dev profile based on the current opened folder/project, so that once you configure it it's associated to your current project and you don't have the risk of running a "pac portal update" on dev2 while having dev1 profile selected if that makes sense

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 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard