Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
snow84
Frequent Visitor

Why would two users throw errors with the API?

I've been using Powershell to call the API to get lists of reports users have access to. I'm using the UPN.

 

Invoke-PowerBIRestMethod -url https://api.powerbi.com/v1.0/myorg/admin/users/email@domain.com/artifactAccess -Method GET

 

This works fine for 99% of users (I'm iterating over the list of people with licenses). But there's two people (who definitely have licenses and access to reports) who throw errors.

 

This is the error in Powershell:

 

Invoke-PowerBIRestMethod : One or more errors occurred.
At line:1 char:1
+ Invoke-PowerBIRestMethod -url https://api.powerbi.com/v1.0/myorg/admi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIRestMethod], Ag
gregateException
+ FullyQualifiedErrorId : One or more errors occurred.,Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod

Invoke-PowerBIRestMethod : Encountered errors when invoking the command: {
"code": "InvalidRequest",
"message": "Invalid parameter value"
}
At line:1 char:1
+ Invoke-PowerBIRestMethod -url https://api.powerbi.com/v1.0/myorg/admi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIRestMethod], Ex
ception
+ FullyQualifiedErrorId : Encountered errors when invoking the command: {
"code": "InvalidRequest",
"message": "Invalid parameter value"
},Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod

5 REPLIES 5
lbendlin
Super User
Super User

For example in Outlook you can examine the user properties. The "Email addresses"  tab lists all aliases. The one in caps is the primary.

lbendlin
Super User
Super User

is that their primary email (the one in caps) or one of the aliases?

How would I know if it was an alias? I'm looking in the microsoft 365 admin center and they're listed as having the license under the account

lbendlin
Super User
Super User

how is their email address format different from everybody else's ?

Basically everyone, including the two of them, is firstinitiallastname@domain.com

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.