Skip to content

Latest commit

 

History

History
54 lines (29 loc) · 2.64 KB

PAC CLI.md

File metadata and controls

54 lines (29 loc) · 2.64 KB

Connect to the Power Platform using the Power Platform Command-Line Interface (CLI)

  1. In your codespace, click on the Power Platform icon in the left navigation

    Power Platform icon in the left navigation

    You'll more than likely see that there is "No auth profiles found on this computer". Let's create one.

    Screenshot of no auth profiles found

  2. If you don't see it open already, let's open the Terminal. Click on the Burger menu icon in the top left corner and then hover over Terminal and then click New Terminal

    Screenshot of new terminal menu

    A terminal window has now been opened for you. This is where you will write all of the following commands in this lab and in the upcoming labs as well.

  3. Type the following command in the terminal and then press Enter:

    pac auth create --deviceCode
  4. You will be prompted to use a web browser to authenticate. Copy (ctrl + c) the code that is provided in the terminal and then Ctrl + click on the link that is provided in the terminal.

    Screenshot of the terminal with the code and link

    Once you click on that link, it will open a new browser tab where you will have to paste that code into the browser and then click Next

    Note: If you are using a Mac, you can Ctrl + click on the link that is provided in the terminal and then enter the code provided.

    Enter code and click next

  5. Pick the account that was provided to you. If you can't see it on screen then log in.

    Screenshot of the account selection page

  6. Then type in your password and click Sign in

    You will then see a page asking if you're trying to sign in to Power Platform CLI - pac.

    Screenshot of the Are you trying to sign in to Power Platform CLI - pac? page

  7. Click Continue

    You'll then see a prompt confirming that you have successfully signed in to Power Platform CLI - pac. Close the browser tab and return to your codespace.

  8. Refresh the Auth Profiles section by clicking on the Refresh button next to "Auth Profiles"

    Screenshot of the Auth Profiles section with the Refresh button

    You should now see at least one auth profile. If you have more than one, you can select the one you want to use by clicking on the Select Auth Profile button next to the auth profile.

    Select Auth Profile