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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.

Top Kudoed Authors