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 Apps / Automating the input o...
Power Apps
Unanswered

Automating the input of Credentials to Add-PowerAppsAccount

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is there any way to pass the credentials required for Add-PowerAppsAccount to the function using parameters?

I have the same question (0)
  • jo Profile Picture
    Microsoft Employee on at

    Yes!  I call this out here: https://docs.microsoft.com/powerapps/administrator/powerapps-powershell#installation:

     

     

    # Here is how you can pass in credentials (avoiding opening a prompt)

     

    $pass = ConvertTo-SecureString "password" -AsPlainText -Force

    Add-PowerAppsAccount -Username foo@bar.com -Password $pass

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    There is no parameter for Username or Password. The only parameters available are:

     

    Add-PowerAppsAccount [[-Audience] <string>] [[-Endpoint] {prod | preview | tip1 | tip2}]  [<CommonParameters>]

     

    Where can I get your version of the Add-PowerAppsAccount cmdlet?

     

    Regards

     

    Eddie

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Eddie,

     

    If you download from the link on this page, you will get the V3 of the cmdlets.

    With this version, Add-PowerAppsAccount takes the additional parameters.

     

    Regards,

    Luzi

  • John_ Profile Picture
    13 on at

    I know I'm coming accross this post like several months later, however would suggest not putting your password in plaintext in a script file.

     

    -First export your credentials,

    Get-Credential | Export-CliXml 'C:\location.xml'

    Then each time after that, you can do this,

    $cred = Import-Clixml 'C:\location.xml'
    Add-PowerAppsAccount -Username $cred.UserName -Password $cred.Password

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard