cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Automating the input of Credentials to Add-PowerAppsAccount

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

4 REPLIES 4
Highlighted
Power Apps
Power Apps

Re: Automating the input of Credentials to Add-PowerAppsAccount

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

Highlighted
New Member

Re: Automating the input of Credentials to Add-PowerAppsAccount

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

Anonymous
Not applicable

Re: Automating the input of Credentials to Add-PowerAppsAccount

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

Highlighted
Frequent Visitor

Re: Automating the input of Credentials to Add-PowerAppsAccount

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,774)