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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PawelM
Frequent Visitor

PowerShell Invoke-PowerBIRestMethod - ArtifactTypes and AccessRight

Hello All,

 

I have searched online but have not found anything substantial. 

 

Use case: I want to use PowerShell and the Invoke-PowerBIRestMethod to get artifactAccess for an ObjectID (GraphID) Where ArtifactType is a DataSet, but I also only want to see the ArtifactAccess if the ObjectID (GraphID) has accessright of "Owner".

Is this possible?

 

Below is what I am currently running in Powershell:

Invoke-PowerBIRestMethod -URL 'admin/users/ObjectID/artifactAccess?artifactTypes=Dataset' -Method GET

3 REPLIES 3
ibarrau
Super User
Super User

Hi. I would like to start saying that the request doesn't follow a request a the docs. You can check the requests for invoke powerbi rest method in here: https://learn.microsoft.com/en-us/rest/api/power-bi/

I think you might be looking for this one: "Granting access to a user for a dataset": https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/post-dataset-user

The URL might be "myorg/datasets/{dataset_id}/users"

I hope that helps,

P/D Be aware to read the required scope and the limitations


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Hello @ibarrau 

The request works fine in PowerShell and I can get back Artifacts with the GraphID. My question is more around the Acutal Get Method as described.

Oh, I see. What do you mean with Artifact access.
I'm reading the request and it will only let you get a response for the access of specific users.

https://learn.microsoft.com/en-us/rest/api/power-bi/admin/users-get-user-artifact-access-as-admin

If you want to know more about the datasets of the specific users, you might want to check the datasets requests in order to run a request for the reponse of each datasets of the user.

I hope that make sense


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors