Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running in PowerShell #40

Open
JimSorenson opened this issue Aug 29, 2023 · 2 comments
Open

Issue running in PowerShell #40

JimSorenson opened this issue Aug 29, 2023 · 2 comments

Comments

@JimSorenson
Copy link

I have set this up just as described in the ReadME and keep running into this error: Fetch - Run.ps1 : Error on '.\Fetch - Activity.ps1' - System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).

I have checked and double checked everything and cannot figure out the source of the error.

@JimSorenson
Copy link
Author

more information: The error is within the Fetc-Activity.ps1 script. I've stepped through that script and it errors when connecting to the $activityAPIUrl with the below message. Ignore the line #, I made changes to the script to execute without calling on config.json.

Invoke-PowerBIRestMethod : One or more errors occurred.
At C:\Scripts\Temp\Fetch - Activity.ps1:93 char:27

  • ... $result = Invoke-PowerBIRestMethod -Url $activityAPIUrl -method Get ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIRestMethod], AggregateException
    • FullyQualifiedErrorId : One or more errors occurred.,Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod

I have checked permissions to the app registration and have verified the settings within Power BI Tenant Admin. This particular powershell error is very inconclusive.

@JamesDBartlett3
Copy link
Collaborator

@JimSorenson Are you still experiencing this issue? If so, can you confirm that your app registration has the required permissions by authenticating with Login-PowerBIServiceAccount -ServicePrincipal and running the same commands that the script tries to run?

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

No branches or pull requests

2 participants