Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

Issue using variables in Power Apps CLI Deployment Profile

(1) ShareShare
ReportReport
Posted on 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 at
    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 at
    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 at
    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 at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43