Showing results for 
Search instead for 
Did you mean: 
Resolver III
Resolver III

Best Practices for Power Pages/Portals development with CLI

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.

Resolver III
Resolver III


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.

Super User
Super User

Hi @joaodsantos 

I use the Portal Build tool from Arpit. Link below 


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.

Resolver III
Resolver III

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

Helpful resources

Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (3,823)