Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to connect PowerBI by passing crediting to automate the PowerShell script for extraction PBIX templates across the workspaces at organization level. This below script is not working.
Script:
Import-Module MicrosoftPowerBIMgmt
Import-Module MicrosoftPowerBIMgmt.Profile
$password = "mypassword" | ConvertTo-SecureString -asPlainText -Force
$username = "myemail"
$credential = New-Object System.Management.Automation.PSCredential($username, $password)
Connect-PowerBIServiceAccount -Credential $credential
Errors:
Connect-PowerBIServiceAccount : Failed to get ADAL token: Unhandled Exception: System.AggregateException: One or more
errors occurred. ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException:
accessing_ws_metadata_exchange_failed: Accessing WS metadata exchange failed --->
System.Net.Http.HttpRequestException: Response status code does not indicate success: 406 (NotAcceptable). --->
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: : Unknown error --- End of inner exception stack
trace --- --- End of inner exception stack trace --- at
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.