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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Microsoft Power Platfo...
Power Pages
Unanswered

Microsoft Power Platform CLI: How can I specify another environment using the paportal commmand in Visual Studio Code?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all, 

 

I want to download the code from my Power Pages Instance in order to modify it from my Visual Studio Code locally. 

I followed the docs to install Power Platforms extension in Visual Studio Code. My account is in 2 environments.

 

How can I specify another environment using the paportal commmand in Visual Studio Code?

 

Following the docs, I used the following (that's the example from MS docs), but there it checks only in the default environment and does not have an attribute to specify the second environment in which my power pages instance is located. Anyone knows how to do that? Seems like it's not something that exists in the pac paportal commands

 

pac paportal download --path "C:\portals" --webSiteId f88b70cc-580b-4f1a-87c3-41debefeb902

Categories:
I have the same question (0)
  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    hi @Anonymous,

    You need to create an authentication profile for the environment you want to download your portal from. You can use pac auth create command to do that (or use Power Platform Tools extension). If you have a Power Platform Tools extension open it and in a list of Auth Profiles click on a star icon near the name of the profile you need (it should select it). If you don't have an extension use pac auth list to see which profiles are available to you. Check the number of the profile you need and use pac auth select with that number to switch profile. Now you should be able download portal from that environment.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 59

#2
11manish Profile Picture

11manish 51

#3
Haque Profile Picture

Haque 28

Last 30 days Overall leaderboard