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 / Issue using variables ...
Power Pages
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:
I have the same question (0)
  • Christian Leverenz Profile Picture
    1,214 on at

    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

  • NStone Profile Picture
    13 on at

    I tried this but unfortunately it was also unsuccessful.

  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @NStone ,

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

  • rcarrigan Profile Picture
    67 on at

    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.

     

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 49

#2
11manish Profile Picture

11manish 33

#3
Haque Profile Picture

Haque 28

Last 30 days Overall leaderboard