Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

User and Password required #19

Open
miguel-salles-bisolutions opened this issue Sep 19, 2018 · 1 comment
Open

User and Password required #19

miguel-salles-bisolutions opened this issue Sep 19, 2018 · 1 comment

Comments

@miguel-salles-bisolutions
Copy link

miguel-salles-bisolutions commented Sep 19, 2018

Hi,
I am using the manageRefresh.ps1, it works if I type user and password on the pop-up.
However, for running after the ETL, I would need it to run unattended.

How do I add user and password for unattended execution to the script?

I understand that like all requests to the Power BI REST API, I will have to attach an AAD access token. But I dont know how to and the Power BI REST API authentication documentation is not something I am familiar with. (https://docs.microsoft.com/en-us/power-bi/developer/get-azuread-access-token)

Thanks

@sgsshankar
Copy link

You can use something like this to get the Credentials from Username / Password

$User = " Fill in your Username "
$password = " Fill in your Password "
$PWord = ConvertTo-SecureString -String $password -AsPlainText -Force
$UserCredential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $PWord

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants