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

Community site session details

Session Id : RPQkdRHnl1Jjl/OiRK0PHB
Power Pages - General Discussions
Unanswered

Issue using variables in Power Apps CLI Deployment Profile

Like (1) ShareShare
ReportReport
Posted on 9 Jun 2022 15:25:26 by 13

Hey all,

 

I'm working with Power Apps CLI and according to the documentation (https://docs.microsoft.com/en-us/power-apps/maker/portals/power-apps-cli#use-deployment-profile) I should be able to lookup an environment variable from within my deployment profile to fill a value (eg, a client secret). I have not been able to get this to work regardless of what variable or notation I use. During import the variable doesn't get read and is simply input as a text string like ${ThisIsMySecret}.

 

Has anyone got this working or knows what I'm doing wrong?

 

Thanks

 

 

Categories:
  • rcarrigan Profile Picture
    67 on 20 Apr 2023 at 21:41:35
    Re: Issue using variables in Power Apps CLI Deployment Profile

    Hi @NStone ,

     

    Yes, I currently have this working in an Azure DevOps pipeline with the configuration as follows:

    • Pipeline variable named "ThisIsMySecret"
    • Deployment profile with variable named "${OS.THISISMYSECRET}"

    There are two key points to note here:

    1. Deployment profiles use *operating system* environment variables. Reference: https://learn.microsoft.com/en-us/power-pages/configure/power-platform-cli#:~:text=operating%20system%27s%20environment%20variables
    2. ADO Pipelines transforms the text of a variable when storing as an operating system variable during the pipeline run. Reference: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#environment-variables:~:text=When%20variables%20convert%20into%20environment%20variables%2C%20variable%20names%20become%20uppercase%2C%20and%20periods%20turn%20into%20underscores.%20For%20example%2C%20the%20variable%20name%20any.variable%20becomes%20the%20variable%20name%20%24ANY_VARIABLE.

    Hope this helps! If it does, please mark this as the solution so it can help others, like me, that found this.

     

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on 09 Jul 2022 at 01:27:44
    Re: Issue using variables in Power Apps CLI Deployment Profile

    Hi @NStone ,

    Were you trying to use this in Github Actions, Azure DevOps or locally?

  • NStone Profile Picture
    13 on 07 Jul 2022 at 19:20:41
    Re: Issue using variables in Power Apps CLI Deployment Profile

    I tried this but unfortunately it was also unsuccessful.

  • Christian Leverenz Profile Picture
    1,214 on 16 Jun 2022 at 07:32:08
    Re: Issue using variables in Power Apps CLI Deployment Profile

    Hi @NStone ,

    did not try, but the documentation says, that OS is reachable via that. So, may be you have to set an enivronmentvariable for example named ThisIsMySecret and address this with ${OS.ThisIsMySecret}

    The way to set the environment depends a little bit on the system you are working on. In Powershell its as simple as 

    chleverenz_0-1655364626572.png

    May be, this is reachable vis ${OS.X} 🙂

    Hope it helps,

      Christian

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 2

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 2

#3
surya narayanan Profile Picture

surya narayanan 35

Loading complete