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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
stephanvierkant
Regular Visitor

How to get ReadWrite permission?

I've created an app to get an embed token and that's working fine. But when I try to trigger a refresh for the specified dataset (Required scope: Dataset.ReadWrite.All), I get a `401 Unauthorized` response. I'm using the Rest API with a password grant.

 

These are the values of my access token:

array:6 [
"token_type" => "Bearer"
"scope" => "Capacity.Read.All Dashboard.Read.All Dataset.Read.All Group.Read Report.Read.All Workspace.Read.All"
"ext_expires_in" => "3600"
"expires_on" => "1573226297"
"not_before" => "1573222397"
"resource" => "https://analysis.windows.net/powerbi/api"

]

 

How can I get `Dataset.ReadWrite.All` in my scope? In the Azure Portal I've added all permissions to my app, but it still gives me read access. When I use the 'demo client' in the documentation (https://docs.microsoft.com/nl-nl/rest/api/power-bi/datasets/refreshdataset#code-try-0) it works, but in my CLI app it doesn't. 

1 REPLY 1
Jayendran
Solution Sage
Solution Sage

Hi @stephanvierkant ,

 

Could you please try giving the Admin consent to your application which you reg in AD

grantpermission

 

Then try to generate the token check whether you scope is updated correctly

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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