Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hi,
I'm trying to connect to powerBI by using API from powershell.
this is the code that I'm using:
$common = $PSScriptRoot + "\common.ps1" . $common ##set parent directory for this file #set project setting file $parentfDir = Split-Path $PSScriptRoot -Parent $confDir = getFilePath $parentfDir "\json\automation_tools_seting.json" #get project settings and package parameter $conf = loadJsonFile $confDir $user = $conf.PBI_user $pass = $conf.PBI_pass | ConvertTo-SecureString -asPlainText -Force $credential = New-Object System.Management.Automation.PSCredential ($user, $pass) try { Connect-PowerBIServiceAccount -Credential $credential Disconnect-PowerBIServiceAccount } catch { Write-Output "$($_.Exception.Message)" }
but it always has an error :
Connect-PowerBIServiceAccount : Failed to get ADAL token:
wondering if there's any mistake inside my code
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |