Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
For example in Outlook you can examine the user properties. The "Email addresses" tab lists all aliases. The one in caps is the primary.
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
how is their email address format different from everybody else's ?
Basically everyone, including the two of them, is firstinitiallastname@domain.com
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |