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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.